diff options
Diffstat (limited to 'src/webpage.cpp')
-rw-r--r-- | src/webpage.cpp | 36 |
1 files changed, 1 insertions, 35 deletions
diff --git a/src/webpage.cpp b/src/webpage.cpp index 8c6c0d2a..133a263c 100644 --- a/src/webpage.cpp +++ b/src/webpage.cpp @@ -40,7 +40,7 @@ #include <KUrl> #include <KActionCollection> #include <KDebug> -#include <KToolInvocation> + #include <KDE/KParts/BrowserRun> #include <KDE/KMimeTypeTrader> @@ -76,40 +76,6 @@ WebPage::WebPage(QObject *parent) } -bool WebPage::acceptNavigationRequest(QWebFrame *frame, const QNetworkRequest &request, NavigationType type) -{ - - // TODO: implement ioslaves protocols - QString scheme = request.url().scheme(); - if (scheme == QLatin1String("mailto")) - { - KToolInvocation::invokeMailer(request.url()); - return false; - } - - // create convenience fake api:// protocol for KDE apidox search and Qt docs - if (scheme == QLatin1String("api")) - { - QString path; - QString className = request.url().host().toLower(); - if (className[0] == 'k') - { - path = QString("http://api.kde.org/new.classmapper.php?class=%1").arg(className); - } - else if (className[0] == 'q') - { - path = QString("http://doc.trolltech.com/4.5/%1.html").arg(className); - } - KUrl url(path); - - Application::instance()->mainWindow()->loadUrl(url); - return false; - } - - return QWebPage::acceptNavigationRequest(frame, request, type); -} - - KWebPage *WebPage::createWindow(QWebPage::WebWindowType type) { kDebug() << "creating window as new tab.. "; |