summaryrefslogtreecommitdiffstats
path: root/logic/updater/NotificationChecker.cpp
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2014-04-05 22:58:47 +0200
committerPetr Mrázek <peterix@gmail.com>2014-04-06 00:33:33 +0200
commit42e305bb9d1babef9bb66a8d376289e8aebed671 (patch)
tree7cad2b473abc703d3c9f29daee7f5560d6e22e76 /logic/updater/NotificationChecker.cpp
parentad9d082f5713df72fc18de957547b7ad47a60e46 (diff)
downloadMultiMC-42e305bb9d1babef9bb66a8d376289e8aebed671.tar
MultiMC-42e305bb9d1babef9bb66a8d376289e8aebed671.tar.gz
MultiMC-42e305bb9d1babef9bb66a8d376289e8aebed671.tar.lz
MultiMC-42e305bb9d1babef9bb66a8d376289e8aebed671.tar.xz
MultiMC-42e305bb9d1babef9bb66a8d376289e8aebed671.zip
Get rid of long rebuilds because of minor cmake config changes
Diffstat (limited to 'logic/updater/NotificationChecker.cpp')
-rw-r--r--logic/updater/NotificationChecker.cpp13
1 files changed, 6 insertions, 7 deletions
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 <QJsonArray>
#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;
}