summaryrefslogtreecommitdiff
path: root/src/webview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/webview.cpp')
-rw-r--r--src/webview.cpp15
1 files changed, 5 insertions, 10 deletions
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())