summaryrefslogtreecommitdiff
path: root/src/webpage.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/webpage.cpp')
-rw-r--r--src/webpage.cpp16
1 files changed, 7 insertions, 9 deletions
diff --git a/src/webpage.cpp b/src/webpage.cpp
index 59df13e7..340e9805 100644
--- a/src/webpage.cpp
+++ b/src/webpage.cpp
@@ -72,7 +72,7 @@
WebPage::WebPage(QObject *parent)
: KWebPage(parent, KWalletIntegration)
- , m_newTabPage(0)
+ , m_newTabPage(new NewTabPage(mainFrame() ))
{
setForwardUnsupportedContent(true);
@@ -104,6 +104,12 @@ WebPage::~WebPage()
}
+NewTabPage* WebPage::newTabPage()
+{
+ return m_newTabPage;
+}
+
+
bool WebPage::acceptNavigationRequest(QWebFrame *frame, const QNetworkRequest &request, NavigationType type)
{
// advise users on resubmitting data
@@ -115,14 +121,6 @@ bool WebPage::acceptNavigationRequest(QWebFrame *frame, const QNetworkRequest &r
if(risp == KMessageBox::Cancel)
return false;
}
-
- if (request.url().scheme() == QLatin1String("about"))
- {
- if(m_newTabPage == 0)
- m_newTabPage = new NewTabPage(frame);
- m_newTabPage->generate(request.url());
- return false;
- }
if (frame && m_protHandler.preHandling( request, frame ))
{