diff -r 8121ce2b0a88 -r bd8df772dbe6 QTfrontend/ui/page/pagedata.cpp
--- a/QTfrontend/ui/page/pagedata.cpp Fri Apr 05 22:57:31 2013 +0200
+++ b/QTfrontend/ui/page/pagedata.cpp Sat Apr 06 01:02:28 2013 +0200
@@ -60,7 +60,10 @@
web->setOpenLinks(false);
// fetchList();
-
+ web->setHtml(QString(
+ "
Hedgewars Downloadable Content
"
+ "%1")
+ .arg(tr("Loading, please wait.")));
m_contentDownloaded = false;
}
@@ -106,8 +109,7 @@
{
QNetworkReply * reply = qobject_cast(sender());
- if(reply)
- {
+ if (reply && (reply->error() == QNetworkReply::NoError)) {
QString html = QString::fromUtf8(reply->readAll());
int begin = html.indexOf("");
int end = html.indexOf("");
@@ -117,7 +119,11 @@
html.remove(0, begin);
}
web->setHtml(html);
- }
+ } else
+ web->setHtml(QString(
+ "Hedgewars Downloadable Content
"
+ "%1
")
+ .arg(tr("This page requires an internet connection.")));
}
void PageDataDownload::fileDownloaded()