summaryrefslogtreecommitdiffstats
path: root/logic/news
diff options
context:
space:
mode:
Diffstat (limited to 'logic/news')
-rw-r--r--logic/news/NewsChecker.cpp6
-rw-r--r--logic/news/NewsChecker.h8
2 files changed, 7 insertions, 7 deletions
diff --git a/logic/news/NewsChecker.cpp b/logic/news/NewsChecker.cpp
index 39796e36..be4aa1d1 100644
--- a/logic/news/NewsChecker.cpp
+++ b/logic/news/NewsChecker.cpp
@@ -33,7 +33,7 @@ void NewsChecker::reloadNews()
qDebug() << "Ignored request to reload news. Currently reloading already.";
return;
}
-
+
qDebug() << "Reloading news.";
NetJob* job = new NetJob("News RSS Feed");
@@ -95,10 +95,10 @@ void NewsChecker::rssDownloadFinished()
succeed();
}
-void NewsChecker::rssDownloadFailed()
+void NewsChecker::rssDownloadFailed(QString reason)
{
// Set an error message and fail.
- fail("Failed to load news RSS feed.");
+ fail(tr("Failed to load news RSS feed:\n%1").arg(reason));
}
diff --git a/logic/news/NewsChecker.h b/logic/news/NewsChecker.h
index 3a0f9ec8..effa80bf 100644
--- a/logic/news/NewsChecker.h
+++ b/logic/news/NewsChecker.h
@@ -31,7 +31,7 @@ public:
* Constructs a news reader to read from the given RSS feed URL.
*/
NewsChecker(const QString& feedUrl);
-
+
/*!
* Returns the error message for the last time the news was loaded.
* Empty string if the last load was successful.
@@ -42,7 +42,7 @@ public:
* Returns true if the news has been loaded successfully.
*/
bool isNewsLoaded() const;
-
+
//! True if the news is currently loading. If true, reloadNews() will do nothing.
bool isLoadingNews() const;
@@ -70,7 +70,7 @@ signals:
protected slots:
void rssDownloadFinished();
- void rssDownloadFailed();
+ void rssDownloadFailed(QString reason);
protected:
//! The URL for the RSS feed to fetch.
@@ -91,7 +91,7 @@ protected:
*/
QString m_lastLoadError;
-
+
/*!
* Emits newsLoaded() and sets m_lastLoadError to empty string.
*/