代码拉取完成,页面将自动刷新
同步操作将从 zhjun5337/kopete-qq 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
/*
qqdiscuchatsession.cpp - Manages Discussion chats
Copyright (c) 2014 by Jun Zhang <jun.zhang@i-soft.com.cn>
Copyright (c) 2002 by Duncan Mac-Vicar Prett <duncan@kde.org>
Copyright (c) 2002 by Daniel Stone <dstone@kde.org>
Copyright (c) 2002-2003 by Martijn Klingens <klingens@kde.org>
Copyright (c) 2002-2004 by Olivier Goffart <ogoffart@kde.org>
Copyright (c) 2003 by Jason Keirstead <jason@keirstead.org>
Copyright (c) 2005 by Michaël Larouche <larouche@kde.org>
Copyright (c) 2009 by Fabian Rami <fabian.rami@wowcompany.com>
Kopete (c) 2002-2003 by the Kopete developers <kopete-devel@kde.org>
*************************************************************************
* *
* This library is free software; you can redistribute it and/or *
* modify it under the terms of the GNU Lesser General Public *
* License as published by the Free Software Foundation; either *
* version 2 of the License, or (at your option) any later version. *
* *
*************************************************************************
*/
#include <kdebug.h>
#include <klineedit.h>
#include <klocale.h>
#include <kmessagebox.h>
#include <kmenu.h>
#include <kconfig.h>
#include <kopetecontactaction.h>
#include <kopetecontactlist.h>
#include <kopetecontact.h>
#include <kopetechatsessionmanager.h>
#include <kopeteuiglobal.h>
#include <kicon.h>
#include "qqdiscuchatsession.h"
#include "qqcontact.h"
#include "qqaccount.h"
#include "kopeteprotocol.h"
//#include "qqinvitelistimpl.h"
#include <kactioncollection.h>
QQDiscuChatSession::QQDiscuChatSession(Kopete::Protocol *protocol, const Kopete::Contact *user,
Kopete::ContactPtrList others )
: Kopete::ChatSession( user, others, protocol )
{
Kopete::ChatSessionManager::self()->registerChatSession( this );
setComponentData(protocol->componentData());
//m_qqRoom = qqRoom;
// m_actionInvite = new KAction( KIcon("x-office-contact"), i18n( "&Invite others" ), this ); // icon should probably be "contact-invite", but that doesn't exist... please request an icon on http://techbase.kde.org/index.php?title=Projects/Oxygen/Missing_Icons
// actionCollection()->addAction( "qqInvite", m_actionInvite );
// connect ( m_actionInvite, SIGNAL(triggered(bool)), this, SLOT(slotInviteOthers()) );
setXMLFile("qqdiscuui.rc");
}
QQDiscuChatSession::~QQDiscuChatSession()
{
//emit leavingConference( this );
}
QQAccount *QQDiscuChatSession::account()
{
return static_cast< QQAccount *>( Kopete::ChatSession::account() );
}
const QString &QQDiscuChatSession::room()
{
return m_qqRoom;
}
void QQDiscuChatSession::joined( QQContact *c )
{
addContact( c );
}
void QQDiscuChatSession::left( QQContact *c )
{
removeContact( c );
}
void QQDiscuChatSession::removeAllContacts()
{
Kopete::ContactPtrList m = members();
foreach( Kopete::Contact *c, m )
{
removeContact( c );
}
}
void QQDiscuChatSession::setTopic( const QString & topic )
{
setDisplayName(topic);
}
//void QQDiscuChatSession::slotMessageSent( Kopete::Message & message, Kopete::ChatSession * )
//{
// QQAccount *acc = dynamic_cast< QQAccount *>( account() );
// if( acc )
// acc->sendConfMessage( this, message );
// appendMessage( message );
// messageSucceeded();
//}
//void QQDiscuChatSession::slotInviteOthers()
//{
// QStringList buddies;
// QHash<QString, Kopete::Contact*>::ConstIterator it, itEnd = account()->contacts().constEnd();
// for( it = account()->contacts().constBegin(); it != itEnd; ++it )
// {
// if( !members().contains( it.value() ) )
// buddies.push_back( it.value()->contactId() );
// }
// QQInviteListImpl *dlg = new QQInviteListImpl( Kopete::UI::Global::mainWidget() );
// QObject::connect( dlg, SIGNAL(readyToInvite(QString,QStringList,QStringList,QString)),
// account(), SLOT(slotAddInviteConference(QString,QStringList,QStringList,QString)) );
// dlg->setRoom( m_qqRoom );
// dlg->fillFriendList( buddies );
// for( QList<Kopete::Contact*>::ConstIterator it = members().constBegin(); it != members().constEnd(); ++it )
// dlg->addParticipant( (*it)->contactId() );
// dlg->show();
//}
#include "qqdiscuchatsession.moc"
// vim: set noet ts=4 sts=4 sw=4:
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。