summaryrefslogtreecommitdiffstats
path: root/demos/browser/tabwidget.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'demos/browser/tabwidget.cpp')
-rw-r--r--demos/browser/tabwidget.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/demos/browser/tabwidget.cpp b/demos/browser/tabwidget.cpp
index f2f1b32..8a7ae0b 100644
--- a/demos/browser/tabwidget.cpp
+++ b/demos/browser/tabwidget.cpp
@@ -560,10 +560,13 @@ void TabWidget::closeTab(int index)
}
hasFocus = tab->hasFocus();
- m_recentlyClosedTabsAction->setEnabled(true);
- m_recentlyClosedTabs.prepend(tab->url());
- if (m_recentlyClosedTabs.size() >= TabWidget::m_recentlyClosedTabsSize)
- m_recentlyClosedTabs.removeLast();
+ QWebSettings *globalSettings = QWebSettings::globalSettings();
+ if (!globalSettings->testAttribute(QWebSettings::PrivateBrowsingEnabled)) {
+ m_recentlyClosedTabsAction->setEnabled(true);
+ m_recentlyClosedTabs.prepend(tab->url());
+ if (m_recentlyClosedTabs.size() >= TabWidget::m_recentlyClosedTabsSize)
+ m_recentlyClosedTabs.removeLast();
+ }
}
QWidget *lineEdit = m_lineEdits->widget(index);
m_lineEdits->removeWidget(lineEdit);