diff options
author | Szabolcs David <davidsz@inf.u-szeged.hu> | 2017-02-13 08:48:37 -0800 |
---|---|---|
committer | Szabolcs David <davidsz@inf.u-szeged.hu> | 2017-02-21 08:22:30 +0000 |
commit | 905017117d38d799bc95d6cfdd0195b717b605b8 (patch) | |
tree | cf76af1f06722ca0ea8cdc953d38042ee5535089 /src/webengine/ui_delegates_manager.cpp | |
parent | a6c6665d79e6d4097c0a1155ff5f963b9a9eab19 (diff) |
Fix empty dialogs on window.onbeforeunload
Custom texts are not supported anymore in unload dialogs. Fill them
with a better message.
Task-number: QTBUG-58673
Change-Id: I820155452461db90bf1df2ae8a8ec10ee752aab1
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'src/webengine/ui_delegates_manager.cpp')
-rw-r--r-- | src/webengine/ui_delegates_manager.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/webengine/ui_delegates_manager.cpp b/src/webengine/ui_delegates_manager.cpp index a37484023..4a47a49eb 100644 --- a/src/webengine/ui_delegates_manager.cpp +++ b/src/webengine/ui_delegates_manager.cpp @@ -330,7 +330,10 @@ void UIDelegatesManager::showDialog(QSharedPointer<JavaScriptDialogController> d item->setParentItem(m_view); dialog->setParent(m_view); QQmlProperty textProp(dialog, QStringLiteral("text")); - textProp.write(dialogController->message()); + if (dialogController->type() == WebContentsAdapterClient::UnloadDialog) + textProp.write(tr("Changes that you made may not be saved.")); + else + textProp.write(dialogController->message()); QQmlProperty titleProp(dialog, QStringLiteral("title")); titleProp.write(title); |