summaryrefslogtreecommitdiffstats
path: root/api/logic/notifications/NotificationChecker.cpp
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2016-05-28 19:54:17 +0200
committerPetr Mrázek <peterix@gmail.com>2016-06-05 23:55:39 +0200
commita1abbd9e05c80584d831b1d12c27c5f7d731cece (patch)
tree3324eaf37efa228e07a0e3136952673f0bc3405a /api/logic/notifications/NotificationChecker.cpp
parenta750f6e63c783730380c19788deff2acfb3f4836 (diff)
downloadMultiMC-a1abbd9e05c80584d831b1d12c27c5f7d731cece.tar
MultiMC-a1abbd9e05c80584d831b1d12c27c5f7d731cece.tar.gz
MultiMC-a1abbd9e05c80584d831b1d12c27c5f7d731cece.tar.lz
MultiMC-a1abbd9e05c80584d831b1d12c27c5f7d731cece.tar.xz
MultiMC-a1abbd9e05c80584d831b1d12c27c5f7d731cece.zip
NOISSUE refactor *Download into more, smaller pieces
* Download is now Download. * Download uses Sink subclasses to process various events. * Validators can be used to further customize the Sink behaviour.
Diffstat (limited to 'api/logic/notifications/NotificationChecker.cpp')
-rw-r--r--api/logic/notifications/NotificationChecker.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/api/logic/notifications/NotificationChecker.cpp b/api/logic/notifications/NotificationChecker.cpp
index ab2570b7..6d006c31 100644
--- a/api/logic/notifications/NotificationChecker.cpp
+++ b/api/logic/notifications/NotificationChecker.cpp
@@ -6,7 +6,7 @@
#include <QDebug>
#include "Env.h"
-#include "net/CacheDownload.h"
+#include "net/Download.h"
NotificationChecker::NotificationChecker(QObject *parent)
@@ -55,9 +55,8 @@ void NotificationChecker::checkForNotifications()
m_checkJob.reset(new NetJob("Checking for notifications"));
auto entry = ENV.metacache()->resolveEntry("root", "notifications.json");
entry->setStale(true);
- m_checkJob->addNetAction(m_download = CacheDownload::make(m_notificationsUrl, entry));
- connect(m_download.get(), &CacheDownload::succeeded, this,
- &NotificationChecker::downloadSucceeded);
+ m_checkJob->addNetAction(m_download = Net::Download::makeCached(m_notificationsUrl, entry));
+ connect(m_download.get(), &Net::Download::succeeded, this, &NotificationChecker::downloadSucceeded);
m_checkJob->start();
}