summaryrefslogtreecommitdiff
path: root/src/webtab/protocolhandler.cpp
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2012-08-01 10:46:15 +0200
committerAndrea Diamantini <adjam7@gmail.com>2012-12-10 02:48:04 +0100
commit76af6dc385cb275da7af92933ec14c0177b229d6 (patch)
tree95658c2e0019f082a4aad695d2d14a9edfe49ba9 /src/webtab/protocolhandler.cpp
parentCopy webtab related files from rekonq repo (diff)
downloadrekonq-76af6dc385cb275da7af92933ec14c0177b229d6.tar.xz
Let WebView compile and work
WARNING: Not everything compiles yet...
Diffstat (limited to 'src/webtab/protocolhandler.cpp')
-rw-r--r--src/webtab/protocolhandler.cpp26
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());
}
}