From 57fee86eb2756a2f102e2bbeb16a443b84a17e01 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Thu, 9 Mar 2017 07:56:17 +0100 Subject: Call javaScriptConfirm for unload dialogs This unfortunately means we lose the ability to customize the title with the default implementation, but it's still better than having a QMessageBox hardcoded without being able to customize this behavior at all. [ChangeLog][Qt WebEngineWidgets][QWebEnginePage] The javaScriptConfirm method is now also called for unload dialogs (onbeforeunload handlers). Task-number: QTBUG-58673 Change-Id: I82393da2593dc84e94d577ff28f5d6d8988df552 Reviewed-by: Joerg Bornemann --- src/webenginewidgets/doc/src/qwebenginepage_lgpl.qdoc | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/webenginewidgets/doc/src/qwebenginepage_lgpl.qdoc') diff --git a/src/webenginewidgets/doc/src/qwebenginepage_lgpl.qdoc b/src/webenginewidgets/doc/src/qwebenginepage_lgpl.qdoc index 7616ebcee..20805cb71 100644 --- a/src/webenginewidgets/doc/src/qwebenginepage_lgpl.qdoc +++ b/src/webenginewidgets/doc/src/qwebenginepage_lgpl.qdoc @@ -341,6 +341,9 @@ \a securityOrigin calls the \c confirm() function with the message \a msg. Returns \c true if the user confirms the message; otherwise returns \c false. + It is also called when the \c onbeforeunload handler is requesting a confirmation before + leaving a page. + The default implementation executes the query using QMessageBox::information with QMessageBox::Ok and QMessageBox::Cancel buttons. */ -- cgit v1.2.3