diff options
author | Andrea Diamantini <adjam7@gmail.com> | 2013-06-12 11:20:15 +0200 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2013-06-12 11:23:09 +0200 |
commit | fc7ab5e835bb67cde8926de0f5f38fe7a9ace60d (patch) | |
tree | 85384aa6ff76434590f5a7a27c1a509f43059a38 /src | |
parent | remove superfluous sentence (diff) | |
download | rekonq-fc7ab5e835bb67cde8926de0f5f38fe7a9ace60d.tar.xz |
Let private popus open in private mode
BUG: 320218
Diffstat (limited to 'src')
-rw-r--r-- | src/useragent/useragentinfo.cpp | 1 | ||||
-rw-r--r-- | src/webtab/webpage.cpp | 7 | ||||
-rw-r--r-- | src/webtab/webpage.h | 2 | ||||
-rw-r--r-- | src/webtab/webview.cpp | 2 |
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; |