From 4c3bc1deb42f9106aac7e6d9fa1078fe218c0075 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20Tr=C3=B6scher?= Date: Fri, 16 Sep 2011 15:49:38 +0200 Subject: Search with default searchEngine in errorPage REVIEW: 102592 REVIEWED-BY: adjam --- src/webpage.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src') diff --git a/src/webpage.cpp b/src/webpage.cpp index 1119d4b6..17d791c4 100644 --- a/src/webpage.cpp +++ b/src/webpage.cpp @@ -49,6 +49,7 @@ #include "urlbar.h" #include "webpluginfactory.h" #include "webtab.h" +#include "searchengine.h" #include "sslwidget.h" #include "sslinfodialog.h" @@ -658,6 +659,16 @@ QString WebPage::errorPage(QNetworkReply *reply) msg += QL1S(""); + //Default SearchEngine + KService::Ptr defaultEngine = SearchEngine::defaultEngine(); + + if (defaultEngine) + { + msg += i18n("or"); + msg += QL1S(" "); + msg += i18n("Search with %1", defaultEngine->name()) + QL1S(""); + } + QString html = QString(QL1S(file.readAll())) .arg(title) .arg(msg) -- cgit v1.2.1