diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/main.cpp | 4 | ||||
-rw-r--r-- | src/webview.cpp | 15 |
2 files changed, 8 insertions, 11 deletions
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()) |