From 42e305bb9d1babef9bb66a8d376289e8aebed671 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Sat, 5 Apr 2014 22:58:47 +0200 Subject: Get rid of long rebuilds because of minor cmake config changes --- logic/updater/NotificationChecker.cpp | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'logic/updater/NotificationChecker.cpp') diff --git a/logic/updater/NotificationChecker.cpp b/logic/updater/NotificationChecker.cpp index 191e90a3..39da362b 100644 --- a/logic/updater/NotificationChecker.cpp +++ b/logic/updater/NotificationChecker.cpp @@ -5,11 +5,11 @@ #include #include "MultiMC.h" -#include "MultiMCVersion.h" +#include "Config.h" #include "logic/net/CacheDownload.h" NotificationChecker::NotificationChecker(QObject *parent) - : QObject(parent), m_notificationsUrl(QUrl(NOTIFICATION_URL)) + : QObject(parent), m_notificationsUrl(QUrl(BuildConfig.NOTIFICATION_URL)) { // this will call checkForNotifications once the event loop is running QMetaObject::invokeMethod(this, "checkForNotifications", Qt::QueuedConnection); @@ -93,13 +93,12 @@ void NotificationChecker::downloadSucceeded(int) bool NotificationChecker::NotificationEntry::applies() const { - MultiMCVersion version = MMC->version(); - bool channelApplies = channel.isEmpty() || channel == version.channel; - bool platformApplies = platform.isEmpty() || platform == version.platform; + bool channelApplies = channel.isEmpty() || channel == BuildConfig.VERSION_CHANNEL; + bool platformApplies = platform.isEmpty() || platform == BuildConfig.BUILD_PLATFORM; bool fromApplies = - from.isEmpty() || from == FULL_VERSION_STR || !versionLessThan(FULL_VERSION_STR, from); + from.isEmpty() || from == BuildConfig.FULL_VERSION_STR || !versionLessThan(BuildConfig.FULL_VERSION_STR, from); bool toApplies = - to.isEmpty() || to == FULL_VERSION_STR || !versionLessThan(to, FULL_VERSION_STR); + to.isEmpty() || to == BuildConfig.FULL_VERSION_STR || !versionLessThan(to, BuildConfig.FULL_VERSION_STR); return channelApplies && platformApplies && fromApplies && toApplies; } -- cgit v1.2.3