summaryrefslogtreecommitdiff
path: root/src/webwindow
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2012-12-16 17:04:37 +0100
committerAndrea Diamantini <adjam7@gmail.com>2012-12-16 17:04:37 +0100
commite3b8ece1ce004f2049481ceb668bf05ad3ae99f7 (patch)
treec13e0d67aeca03b1a7f95da346a128eca686676d /src/webwindow
parentFix download dir choice (diff)
downloadrekonq-e3b8ece1ce004f2049481ceb668bf05ad3ae99f7.tar.xz
"Workaround" cookie management in private browsing mode
From the note in webpage file: I'm sorry I really cannot let KIO work as needed in private browsing mode. The problem is basically cookie related. This way we lose some features in private browsing mode, but we ensure PRIVACY! This change cannot be reverted until a proper fix for KIO (or the right workaround for rekonq) will be found. BUG: 303552
Diffstat (limited to 'src/webwindow')
-rw-r--r--src/webwindow/webwindow.cpp18
-rw-r--r--src/webwindow/webwindow.h7
2 files changed, 3 insertions, 22 deletions
diff --git a/src/webwindow/webwindow.cpp b/src/webwindow/webwindow.cpp
index 616ccc69..74d1eda7 100644
--- a/src/webwindow/webwindow.cpp
+++ b/src/webwindow/webwindow.cpp
@@ -70,9 +70,9 @@
#include <QVBoxLayout>
-WebWindow::WebWindow(QWidget *parent, WebPage *pg)
+WebWindow::WebWindow(QWidget *parent, bool isPrivateBrowsing, WebPage *pg)
: QWidget(parent)
- , _tab(new WebTab(this))
+ , _tab(new WebTab(this, isPrivateBrowsing))
, _bar(new UrlBar(_tab))
, _mainToolBar(0)
, m_findBar(new FindBar(this))
@@ -81,7 +81,6 @@ WebWindow::WebWindow(QWidget *parent, WebPage *pg)
, m_popup(new QLabel(this))
, m_hidePopupTimer(new QTimer(this))
, _ac(new KActionCollection(this))
- , _isPrivateBrowsing(false)
{
if (pg)
{
@@ -897,19 +896,6 @@ void WebWindow::toggleBookmarksToolbar(bool b)
}
-bool WebWindow::isPrivateBrowsing()
-{
- return _isPrivateBrowsing;
-}
-
-
-void WebWindow::setPrivateBrowsing(bool on)
-{
- _tab->page()->settings()->setAttribute(QWebSettings::PrivateBrowsingEnabled, on);
- _isPrivateBrowsing = on;
-}
-
-
void WebWindow::showCrashMessageBar()
{
_tab->showCrashMessageBar();
diff --git a/src/webwindow/webwindow.h b/src/webwindow/webwindow.h
index 3f7fcc54..55c8b1d7 100644
--- a/src/webwindow/webwindow.h
+++ b/src/webwindow/webwindow.h
@@ -62,7 +62,7 @@ class WebWindow : public QWidget
Q_OBJECT
public:
- WebWindow(QWidget *parent = 0, WebPage *pg = 0);
+ WebWindow(QWidget *parent = 0, bool isPrivateBrowsing = false, WebPage *pg = 0);
~WebWindow();
void load(const QUrl &);
@@ -82,8 +82,6 @@ public:
virtual KActionCollection *actionCollection() const;
QAction *actionByName(const QString &name);
- bool isPrivateBrowsing();
-
void checkFocus();
private:
@@ -92,7 +90,6 @@ private:
public Q_SLOTS:
void setWidgetsHidden(bool hide);
- void setPrivateBrowsing(bool);
private Q_SLOTS:
void webLoadProgress(int);
@@ -177,8 +174,6 @@ private:
QTimer *m_hidePopupTimer;
KActionCollection *_ac;
-
- bool _isPrivateBrowsing;
};
#endif // WEB_WINDOW