summaryrefslogtreecommitdiffstats
path: root/api/logic/news/NewsChecker.h
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/news/NewsChecker.h
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/news/NewsChecker.h')
-rw-r--r--api/logic/news/NewsChecker.h18
1 files changed, 8 insertions, 10 deletions
diff --git a/api/logic/news/NewsChecker.h b/api/logic/news/NewsChecker.h
index b8b90728..90b2f6d1 100644
--- a/api/logic/news/NewsChecker.h
+++ b/api/logic/news/NewsChecker.h
@@ -74,7 +74,7 @@ protected slots:
void rssDownloadFinished();
void rssDownloadFailed(QString reason);
-protected:
+protected: /* data */
//! The URL for the RSS feed to fetch.
QString m_feedUrl;
@@ -87,21 +87,19 @@ protected:
//! True if news has been loaded.
bool m_loadedNews;
+ QByteArray newsData;
+
/*!
* Gets the error message that was given last time the news was loaded.
* If the last news load succeeded, this will be an empty string.
*/
QString m_lastLoadError;
+protected slots:
+ /// Emits newsLoaded() and sets m_lastLoadError to empty string.
+ void succeed();
- /*!
- * Emits newsLoaded() and sets m_lastLoadError to empty string.
- */
- void Q_SLOT succeed();
-
- /*!
- * Emits newsLoadingFailed() and sets m_lastLoadError to the given message.
- */
- void Q_SLOT fail(const QString& errorMsg);
+ /// Emits newsLoadingFailed() and sets m_lastLoadError to the given message.
+ void fail(const QString& errorMsg);
};