MsgProcessor::MsgProcessor() { setTerminationEnabled(true); qRegisterMetaType<ShareQQMsgPtr>("ShareQQMsgPtr"); connect(this, SIGNAL(newFriendChatMsg(ShareQQMsgPtr)), this, SIGNAL(newChatMsg(ShareQQMsgPtr))); connect(this, SIGNAL(newGroupChatMsg(ShareQQMsgPtr)), this, SIGNAL(newChatMsg(ShareQQMsgPtr))); connect(this, SIGNAL(newSessChatMsg(ShareQQMsgPtr)), this, SIGNAL(newChatMsg(ShareQQMsgPtr))); }
void NotifierPlugin::unload() { NotificationManager *mgr = NotificationManager::instance(); disconnect(mgr, SIGNAL(newChatMsg(ShareQQMsgPtr)), this, SLOT(onNewChatMsg(ShareQQMsgPtr))); }