Commit 4a3f17cd authored by Rafał Malinowski's avatar Rafał Malinowski

closing: fix few deinitialization errors

parent 9f3a78fd
......@@ -100,6 +100,7 @@ KaduWindow::KaduWindow() : MainWindow(nullptr, QString(), 0), Docked(false), Win
KaduWindow::~KaduWindow()
{
m_mainWindowRepository->removeMainWindow(this);
}
void KaduWindow::setAddConferenceAction(AddConferenceAction *addConferenceAction)
......@@ -282,11 +283,6 @@ void KaduWindow::init()
m_mainWindowRepository->addMainWindow(this);
}
void KaduWindow::done()
{
m_mainWindowRepository->removeMainWindow(this);
}
void KaduWindow::createGui()
{
MainWidget = new QWidget(this);
......
......@@ -200,7 +200,6 @@ private slots:
INJEQT_SET void setUrlHandlerManager(UrlHandlerManager *urlHandlerManager);
INJEQT_SET void setUrlOpener(UrlOpener *urlOpener);
INJEQT_INIT void init();
INJEQT_DONE void done();
#ifdef Q_OS_WIN
void setHiddenParent();
......
......@@ -92,6 +92,11 @@ GaduProtocol::~GaduProtocol()
OpenChatRunner = 0;
disconnect(account(), 0, this, 0);
m_chatStateServiceRepository->removeChatStateService(CurrentChatStateService);
m_chatServiceRepository->removeChatService(CurrentChatService);
m_aggregatedContactAvatarService->remove(m_gaduContactAvatarService);
m_aggregatedAccountAvatarService->remove(m_gaduAccountAvatarService);
}
void GaduProtocol::setAggregatedAccountAvatarService(AggregatedAccountAvatarService *aggregatedAccountAvatarService)
......@@ -213,14 +218,6 @@ void GaduProtocol::init()
m_chatStateServiceRepository->addChatStateService(CurrentChatStateService);
}
void GaduProtocol::done()
{
m_chatStateServiceRepository->removeChatStateService(CurrentChatStateService);
m_chatServiceRepository->removeChatService(CurrentChatService);
m_aggregatedContactAvatarService->remove(m_gaduContactAvatarService);
m_aggregatedAccountAvatarService->remove(m_gaduAccountAvatarService);
}
int GaduProtocol::maxDescriptionLength()
{
return GG_STATUS_DESCR_MAXSIZE;
......
......@@ -161,7 +161,6 @@ private slots:
INJEQT_SET void setPluginInjectedFactory(PluginInjectedFactory *pluginInjectedFactory);
INJEQT_SET void setVersionService(VersionService *versionService);
INJEQT_INIT void init();
INJEQT_DONE void done();
void accountUpdated();
......
......@@ -89,6 +89,11 @@ JabberProtocol::~JabberProtocol()
OpenChatWithRunnerManager::instance()->unregisterRunner(m_jabberOpenChatWithRunner);
delete m_jabberOpenChatWithRunner;
m_jabberOpenChatWithRunner = 0;
m_chatStateServiceRepository->removeChatStateService(m_chatStateService);
m_chatServiceRepository->removeChatService(m_chatService);
m_aggregatedContactAvatarService->remove(m_contactAvatarService);
m_aggregatedAccountAvatarService->remove(m_accountAvatarService);
}
void JabberProtocol::setChatServiceRepository(ChatServiceRepository *chatServiceRepository)
......@@ -209,14 +214,6 @@ void JabberProtocol::init()
m_chatStateServiceRepository->addChatStateService(m_chatStateService);
}
void JabberProtocol::done()
{
m_chatStateServiceRepository->removeChatStateService(m_chatStateService);
m_chatServiceRepository->removeChatService(m_chatService);
m_aggregatedContactAvatarService->remove(m_contactAvatarService);
m_aggregatedAccountAvatarService->remove(m_accountAvatarService);
}
void JabberProtocol::rosterReady()
{
/* Since we are online now, set initial presence. Don't do this
......
......@@ -154,7 +154,6 @@ private slots:
INJEQT_SET void setSystemInfo(SystemInfo *systemInfo);
INJEQT_SET void setVersionService(VersionService *versionService);
INJEQT_INIT void init();
INJEQT_DONE void done();
void connectedToServer();
void disconenctedFromServer();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment