summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/useragent/useragentinfo.cpp1
-rw-r--r--src/webtab/webpage.cpp7
-rw-r--r--src/webtab/webpage.h2
-rw-r--r--src/webtab/webview.cpp2
4 files changed, 8 insertions, 4 deletions
diff --git a/src/useragent/useragentinfo.cpp b/src/useragent/useragentinfo.cpp
index 00f0a9db..001dc66f 100644
--- a/src/useragent/useragentinfo.cpp
+++ b/src/useragent/useragentinfo.cpp
@@ -44,6 +44,7 @@
// Qt includes
#include <QStringBuilder>
+
UserAgentInfo::UserAgentInfo()
{
m_providers = KServiceTypeTrader::self()->query("UserAgentStrings");
diff --git a/src/webtab/webpage.cpp b/src/webtab/webpage.cpp
index 7a6a9002..9ed7b8c8 100644
--- a/src/webtab/webpage.cpp
+++ b/src/webtab/webpage.cpp
@@ -127,7 +127,7 @@ static void extractMimeType(const QNetworkReply* reply, QString& mimeType)
// ---------------------------------------------------------------------------------
-WebPage::WebPage(QWidget *parent, bool isPrivateBrowsing)
+WebPage::WebPage(bool isPrivateBrowsing, QWidget *parent)
: KWebPage(parent, KWalletIntegration)
, _networkAnalyzer(false)
, _isOnRekonqPage(false)
@@ -331,7 +331,10 @@ WebPage *WebPage::createWindow(QWebPage::WebWindowType type)
if (type == QWebPage::WebModalDialog)
kDebug() << "Modal Dialog";
- WebPage* p = new WebPage;
+ bool isPrivateBrowsing = settings()->testAttribute(QWebSettings::PrivateBrowsingEnabled);
+
+ // private page links open private pages. See BUG: 320218
+ WebPage* p = new WebPage(isPrivateBrowsing);
emit pageCreated(p);
return p;
}
diff --git a/src/webtab/webpage.h b/src/webtab/webpage.h
index c9bd4c69..a141d38c 100644
--- a/src/webtab/webpage.h
+++ b/src/webtab/webpage.h
@@ -49,7 +49,7 @@ class REKONQ_TESTS_EXPORT WebPage : public KWebPage
Q_OBJECT
public:
- explicit WebPage(QWidget *parent = 0, bool isPrivateBrowsing = false);
+ explicit WebPage(bool isPrivateBrowsing = false, QWidget *parent = 0);
~WebPage();
void setWindow(QWidget *);
diff --git a/src/webtab/webview.cpp b/src/webtab/webview.cpp
index 56ac1e7a..ce3f5a9f 100644
--- a/src/webtab/webview.cpp
+++ b/src/webtab/webview.cpp
@@ -176,7 +176,7 @@ WebPage *WebView::page()
WebPage *p = qobject_cast<WebPage *>(KWebView::page());
if (!p)
{
- p = new WebPage(this, m_isPrivateBrowsing);
+ p = new WebPage(m_isPrivateBrowsing, this);
setPage(p);
}
return p;