# HG changeset patch # User koda # Date 1365202948 -7200 # Node ID bd8df772dbe682c80d0021fecc9b0e855e8c005f # Parent 8121ce2b0a8849a30a2d69878083a6b989fbc6a0 reintroduce the notification message in case you access dlc page without internet connection 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()