X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fqtui%2Fqtui.cpp;h=f3bb9a6df405c474ef1064b053625695d03e33e1;hp=2a0883608cd507410cf2919a59fc0b78d134e8a9;hb=647215f1dd8ea6fdb6e4fb747c5dc3e19c4ec3fc;hpb=2e9492d9ef198bde37da1f858602ab9624c0a12a diff --git a/src/qtui/qtui.cpp b/src/qtui/qtui.cpp index 2a088360..f3bb9a6d 100644 --- a/src/qtui/qtui.cpp +++ b/src/qtui/qtui.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-09 by the Quassel Project * + * Copyright (C) 2005-2010 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,8 +37,8 @@ # include #endif -QPointer QtUi::_instance = 0; -QPointer QtUi::_mainWin = 0; +QtUi *QtUi::_instance = 0; +MainWin *QtUi::_mainWin = 0; QList QtUi::_notificationBackends; QList QtUi::_notifications; @@ -67,12 +67,16 @@ QtUi::QtUi() : GraphicalUi() { QtUi::~QtUi() { unregisterAllNotificationBackends(); delete _mainWin; + _mainWin = 0; + _instance = 0; } void QtUi::init() { _mainWin->init(); QtUiSettings uiSettings; uiSettings.initAndNotify("UseSystemTrayIcon", this, SLOT(useSystemTrayChanged(QVariant)), true); + + GraphicalUi::init(); // needs to be called after the mainWin is initialized } MessageModel *QtUi::createMessageModel(QObject *parent) { @@ -89,6 +93,7 @@ void QtUi::connectedToCore() { void QtUi::disconnectedFromCore() { _mainWin->disconnectedFromCore(); + GraphicalUi::disconnectedFromCore(); } void QtUi::useSystemTrayChanged(const QVariant &v) {