From 84ae0d9c56e9638e5dcf676e1b3fd95571ad1973 Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Fri, 9 Oct 2015 11:34:56 +0200 Subject: 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 --- examples/webenginewidgets/demobrowser/tabwidget.cpp | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/examples/webenginewidgets/demobrowser/tabwidget.cpp b/examples/webenginewidgets/demobrowser/tabwidget.cpp index 4532683b5..9210e3147 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()) { -- cgit v1.2.3