diff options
Diffstat (limited to 'src/webtab/protocolhandler.cpp')
-rw-r--r-- | src/webtab/protocolhandler.cpp | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/src/webtab/protocolhandler.cpp b/src/webtab/protocolhandler.cpp index 186b93d3..8618667b 100644 --- a/src/webtab/protocolhandler.cpp +++ b/src/webtab/protocolhandler.cpp @@ -33,12 +33,10 @@ // Local Includes #include "application.h" #include "historymanager.h" -#include "mainview.h" -#include "mainwindow.h" -#include "newtabpage.h" -#include "urlbar.h" +#include "tabwindow.h" +#include "webwindow.h" +// #include "newtabpage.h" #include "webpage.h" -#include "webtab.h" // KDE Includes #include <KIO/Job> @@ -94,7 +92,7 @@ ProtocolHandler::ProtocolHandler(QObject *parent) , _lister(new KDirLister(this)) , _frame(0) { - _lister->setMainWindow(rApp->mainWindow()); + _lister->setMainWindow(rApp->tabWindow()); } @@ -164,8 +162,8 @@ bool ProtocolHandler::preHandling(const QNetworkRequest &request, QWebFrame *fra WebPage *page = qobject_cast<WebPage *>(frame->page()); page->setIsOnRekonqPage(true); - NewTabPage p(frame); - p.generate(_url); +// FIXME NewTabPage p(frame); +// p.generate(_url); return true; } @@ -183,7 +181,7 @@ bool ProtocolHandler::preHandling(const QNetworkRequest &request, QWebFrame *fra if (_url.protocol() == QL1S("apt")) { kDebug() << "APT URL: " << _url; - (void)new KRun(_url, rApp->mainWindow(), 0, _url.isLocalFile()); + (void)new KRun(_url, rApp->tabWindow(), 0, _url.isLocalFile()); return true; } @@ -192,7 +190,7 @@ bool ProtocolHandler::preHandling(const QNetworkRequest &request, QWebFrame *fra return false; // Error Message, for those protocols we cannot handle - KMessageBox::error(rApp->mainWindow(), i18nc("@info", "rekonq does not know how to handle this protocol: %1", _url.protocol())); + KMessageBox::error(rApp->tabWindow(), i18nc("@info", "rekonq does not know how to handle this protocol: %1", _url.protocol())); return true; } @@ -246,7 +244,7 @@ bool ProtocolHandler::postHandling(const QNetworkRequest &request, QWebFrame *fr // Try KRunning it... if (KProtocolInfo::isKnownProtocol(_url)) { - (void)new KRun(_url, rApp->mainWindow(), 0, _url.isLocalFile()); + (void)new KRun(_url, rApp->tabWindow(), 0, _url.isLocalFile()); return true; } @@ -269,9 +267,9 @@ void ProtocolHandler::showResults(const KFileItemList &list) _frame->setHtml(html); qobject_cast<WebPage *>(_frame->page())->setIsOnRekonqPage(true); - rApp->mainWindow()->mainView()->currentUrlBar()->setQUrl(_url); - rApp->mainWindow()->currentTab()->setFocus(); - rApp->historyManager()->addHistoryEntry(_url, _url.prettyUrl()); +// FIXME rApp->mainWindow()->mainView()->currentUrlBar()->setQUrl(_url); +// rApp->mainWindow()->currentTab()->setFocus(); + HistoryManager::self()->addHistoryEntry(_url, _url.prettyUrl()); } } |