summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@theqtcompany.com>2015-10-09 11:34:56 +0200
committerJoerg Bornemann <joerg.bornemann@theqtcompany.com>2015-10-09 11:24:28 +0000
commit84ae0d9c56e9638e5dcf676e1b3fd95571ad1973 (patch)
tree1a3d227ad0b2f8eb987ae61d5bdb4099152d4f47 /examples
parentf144dbb39bead4cd9ae1e1971e8d904f13675560 (diff)
remove unused code from demobrowser
Remove QWEBENGINEPAGE_ISMODIFIED block from demobrowser. This feature is not implemented. It is questionable whether it should be re-introduced in its old form. Checking whether the user should think twice about leaving the current page is usually implemented by the HTML page itself. Change-Id: I51544129b26f3e0c132e2c983c2ce1744cc19123 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
Diffstat (limited to 'examples')
-rw-r--r--examples/webenginewidgets/demobrowser/tabwidget.cpp15
1 files changed, 0 insertions, 15 deletions
diff --git a/examples/webenginewidgets/demobrowser/tabwidget.cpp b/examples/webenginewidgets/demobrowser/tabwidget.cpp
index 4532683b..9210e314 100644
--- a/examples/webenginewidgets/demobrowser/tabwidget.cpp
+++ b/examples/webenginewidgets/demobrowser/tabwidget.cpp
@@ -591,21 +591,6 @@ void TabWidget::closeTab(int index)
bool hasFocus = false;
if (WebView *tab = webView(index)) {
-#if defined(QWEBENGINEPAGE_ISMODIFIED)
- if (tab->isModified()) {
- QMessageBox closeConfirmation(tab);
- closeConfirmation.setWindowFlags(Qt::Sheet);
- closeConfirmation.setWindowTitle(tr("Do you really want to close this page?"));
- closeConfirmation.setInformativeText(tr("You have modified this page and when closing it you would lose the modification.\n"
- "Do you really want to close this page?\n"));
- closeConfirmation.setIcon(QMessageBox::Question);
- closeConfirmation.addButton(QMessageBox::Yes);
- closeConfirmation.addButton(QMessageBox::No);
- closeConfirmation.setEscapeButton(QMessageBox::No);
- if (closeConfirmation.exec() == QMessageBox::No)
- return;
- }
-#endif
hasFocus = tab->hasFocus();
if (m_profile == QWebEngineProfile::defaultProfile()) {