diff options
author | Szabolcs David <davidsz@inf.u-szeged.hu> | 2015-09-24 06:20:22 -0700 |
---|---|---|
committer | Szabolcs David <davidsz@inf.u-szeged.hu> | 2015-09-27 17:49:05 +0000 |
commit | 2080ac3ad0878dc04865bf957c84f8f0b5b551ac (patch) | |
tree | 45e0d3ec7b4fddfddb4427c640393b18d5897a64 /src/webengine/ui_delegates_manager.cpp | |
parent | e561b9a645a7f9f67f1c2cf3d267b27d66529eb9 (diff) |
Implement unload dialogs
This fixes the assertion that occurs when the application should
show "Are you sure you want to leave this page?" dialog. We can
reuse the already existing confirm dialog implementations.
Change-Id: I22466d450f39b54d9becbb69e1ecadb3b98697b0
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Diffstat (limited to 'src/webengine/ui_delegates_manager.cpp')
-rw-r--r-- | src/webengine/ui_delegates_manager.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/webengine/ui_delegates_manager.cpp b/src/webengine/ui_delegates_manager.cpp index 5a5c261b4..4cc64c8c7 100644 --- a/src/webengine/ui_delegates_manager.cpp +++ b/src/webengine/ui_delegates_manager.cpp @@ -259,6 +259,10 @@ void UIDelegatesManager::showDialog(QSharedPointer<JavaScriptDialogController> d dialogComponentType = PromptDialog; title = QCoreApplication::translate("UIDelegatesManager", "Javascript Prompt - %1").arg(m_view->url().toString()); break; + case WebContentsAdapterClient::UnloadDialog: + dialogComponentType = ConfirmDialog; + title = QCoreApplication::translate("UIDelegatesManager", "Are you sure you want to leave this page?"); + break; case WebContentsAdapterClient::InternalAuthorizationDialog: dialogComponentType = ConfirmDialog; title = dialogController->title(); |