From 9c086fcd342910b5e60f80c7bc893dfbe2591418 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Thu, 24 Sep 2009 02:01:24 +0200 Subject: Fixed not found page to let translators work on it.. --- src/webpage.cpp | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) (limited to 'src/webpage.cpp') diff --git a/src/webpage.cpp b/src/webpage.cpp index d5d1cd7c..7408b490 100644 --- a/src/webpage.cpp +++ b/src/webpage.cpp @@ -224,15 +224,27 @@ QString WebPage::errorPage(QNetworkReply *reply) kWarning() << "Couldn't open the notfound.html file"; return QString(""); } - QString title = i18n("Error loading page: ") + reply->url().toString(); - QString imagePath = KIconLoader::global()->iconPath("rekonq", KIconLoader::NoGroup, false); + QString title = i18n("Error loading: ") + reply->url().path(); + + QString imagesPath = QString("file://") + KGlobal::dirs()->findResourceDir("data", "rekonq/pics/bg.png") + QString("rekonq/pics"); + QString msg = "

" + reply->errorString() + "

"; + + msg += "

" + i18n("When connecting to: ") + reply->url().toString() + "

"; + msg += "

"; + msg += "url().path() + "';\" value=\""; + msg += i18n("Try Again") + "\" />"; + QString html = QString(QLatin1String(file.readAll())) .arg(title) - .arg("file://" + imagePath) - .arg(reply->errorString()) - .arg(reply->url().toString()); + .arg(imagesPath) + .arg(msg) + ; return html; } -- cgit v1.2.1