diff options
author | Andrea Diamantini <adjam7@gmail.com> | 2009-03-24 17:43:34 +0100 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2009-03-24 17:43:34 +0100 |
commit | 1132e1a3b95726f0e2da5c361524eff6c59df1ee (patch) | |
tree | 731dfe0b96dbfd77c85ce139d99d448f9ad148d7 | |
parent | Some fixes on font dim. Updating data still doesn't work.. (diff) | |
download | rekonq-1132e1a3b95726f0e2da5c361524eff6c59df1ee.tar.xz |
Fixed notFound.html page
-rw-r--r-- | htmls/notfound.html | 6 | ||||
-rw-r--r-- | src/main.cpp | 4 | ||||
-rw-r--r-- | src/webview.cpp | 15 |
3 files changed, 11 insertions, 14 deletions
diff --git a/htmls/notfound.html b/htmls/notfound.html index fdfb80bf..09039eb1 100644 --- a/htmls/notfound.html +++ b/htmls/notfound.html @@ -46,9 +46,9 @@ ul { </head> <body> <div id="box"> - <img src="data:image/png;base64,IMAGE_BINARY_DATA_HERE" width="32" height="32" alt="Not found" /> - <h1>%2</h1> - <h2>When connecting to: %3.</h2> + <img src="%2" width="16" height="16" alt="Not found" /> + <h1>%3</h1> + <h2>When connecting to: %4.</h2> <ul> <li>Check the address for errors such as <b>ww</b>.kde.org instead of <b>www</b>.kde.org</li> diff --git a/src/main.cpp b/src/main.cpp index 110188e4..71f5792d 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -18,18 +18,20 @@ * ============================================================ */ - #include "application.h" #include <KAboutData> #include <KCmdLineArgs> #include <KDebug> + static const char description[] = I18N_NOOP("KDE Browser Webkit Based"); + static const char version[] = "0.0.5"; + int main(int argc, char **argv) { KAboutData about( "rekonq", diff --git a/src/webview.cpp b/src/webview.cpp index 0b981633..da286ee8 100644 --- a/src/webview.cpp +++ b/src/webview.cpp @@ -160,22 +160,17 @@ void WebPage::handleUnsupportedContent(QNetworkReply *reply) QFile file( myfilestr ); bool isOpened = file.open(QIODevice::ReadOnly); Q_ASSERT(isOpened); + QString title = i18n("Error loading page: ") + reply->url().toString(); + + QString imagePath = KIconLoader::global()->iconPath( "rekonq", KIconLoader::NoGroup, false); + QString html = QString(QLatin1String(file.readAll())) .arg(title) + .arg("file://" + imagePath) .arg(reply->errorString()) .arg(reply->url().toString()); - QBuffer imageBuffer; - imageBuffer.open(QBuffer::ReadWrite); - QIcon icon = view()->style()->standardIcon(QStyle::SP_MessageBoxWarning, 0, view()); - QPixmap pixmap = icon.pixmap(QSize(32,32)); - if (pixmap.save(&imageBuffer, "PNG")) - { - html.replace(QLatin1String("IMAGE_BINARY_DATA_HERE"), - QString(QLatin1String(imageBuffer.buffer().toBase64()))); - } - QList<QWebFrame*> frames; frames.append(mainFrame()); while (!frames.isEmpty()) |