From 1132e1a3b95726f0e2da5c361524eff6c59df1ee Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Tue, 24 Mar 2009 17:43:34 +0100 Subject: Fixed notFound.html page --- src/main.cpp | 4 +++- src/webview.cpp | 15 +++++---------- 2 files changed, 8 insertions(+), 11 deletions(-) (limited to 'src') 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 #include #include + 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 frames; frames.append(mainFrame()); while (!frames.isEmpty()) -- cgit v1.2.1