diff options
Diffstat (limited to 'src/mainwindow.cpp')
-rw-r--r-- | src/mainwindow.cpp | 41 |
1 files changed, 4 insertions, 37 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 99430b9c..68772bea 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -86,7 +86,6 @@ #include <KParts/BrowserExtension> #include <KMimeTypeTrader> -#include <KUriFilterData> // Qt Includes #include <QtCore/QTimer> @@ -106,9 +105,6 @@ #include <QTextDocument> -KUriFilter *MainWindow::s_uriFilter; - - MainWindow::MainWindow() : KXmlGuiWindow() , m_view(new MainView(this)) @@ -228,9 +224,6 @@ MainWindow::MainWindow() // accept d'n'd setAcceptDrops(true); - if (!s_uriFilter) - s_uriFilter = KUriFilter::self(); - // Things that need to be setup after the call to setupGUI() and after ctor call QTimer::singleShot(1, this, SLOT(postLaunch())); } @@ -1625,9 +1618,9 @@ void MainWindow::loadUrl(const KUrl& url, void MainWindow::loadCheckedUrl(const KUrl& url, const Rekonq::OpenType& type, QWebHistory *webHistory) { - // First, calculate url - KUrl urlToLoad = filterUrlToLoad(url); - + // NOTE: At this point, url should just be resolved via urlresolver. + // No need to check it twice + WebTab *tab = 0; switch (type) { @@ -1656,7 +1649,7 @@ void MainWindow::loadCheckedUrl(const KUrl& url, const Rekonq::OpenType& type, Q WebView *view = tab->view(); if (view) { - view->load(urlToLoad); + view->load(url); if (webHistory) { @@ -1669,29 +1662,3 @@ void MainWindow::loadCheckedUrl(const KUrl& url, const Rekonq::OpenType& type, Q } } } - - -// ------------------------------------------------------------------------------------------ - - -KUrl MainWindow::filterUrlToLoad(const KUrl &url) -{ - QString urlString = url.pathOrUrl(); - // Bookmarklets handling - if (urlString.startsWith(QL1S("javascript:"))) - { - return KUrl(urlString); - } - - // this should let rekonq filtering URI info and supporting - // the beautiful KDE web browsing shortcuts - KUriFilterData data(urlString); - data.setCheckForExecutables(false); // if true, queries like "rekonq" or "dolphin" are considered as executables - - if (s_uriFilter->filterUri(data) && data.uriType() != KUriFilterData::Error) - { - return data.uri(); - } - - return QUrl::fromUserInput(urlString); -} |