NOISSUE remove notification checker form application object

This commit is contained in:
Petr Mrázek
2015-01-29 09:03:11 +01:00
parent 7334b8e520
commit 360ec557b2
4 changed files with 5 additions and 14 deletions

View File

@ -622,8 +622,8 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWi
auto updater = MMC->updateChecker();
updater->checkForUpdate(false);
}
connect(MMC->notificationChecker().get(),
m_notificationChecker.reset(new NotificationChecker());
connect(m_notificationChecker.get(),
&NotificationChecker::notificationCheckFinished, this,
&MainWindow::notificationsChanged);
}
@ -956,7 +956,7 @@ QString intListToString(const QList<int> &list)
void MainWindow::notificationsChanged()
{
QList<NotificationChecker::NotificationEntry> entries =
MMC->notificationChecker()->notificationEntries();
m_notificationChecker->notificationEntries();
QList<int> shownNotifications =
stringToIntList(MMC->settings()->get("ShownNotifications").toString());
for (auto it = entries.begin(); it != entries.end(); ++it)

View File

@ -25,6 +25,7 @@
#include "logic/net/NetJob.h"
class NewsChecker;
class NotificationChecker;
class QToolButton;
class LabeledToolButton;
class QLabel;
@ -200,6 +201,7 @@ private:
std::shared_ptr<GenericPageProvider> m_globalSettingsProvider;
std::shared_ptr<NewsChecker> m_newsChecker;
std::shared_ptr<NotificationChecker> m_notificationChecker;
InstancePtr m_selectedInstance;
QString m_currentInstIcon;