diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2017-03-02 17:30:07 +0100 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2017-03-02 17:30:27 +0100 |
commit | d058d6c9df1ff866e4259ca2989ad144bb01a1e0 (patch) | |
tree | d91f8c314c20781080819d100df6a9855b30fbfd /src/webenginewidgets/api/qwebenginepage.cpp | |
parent | 0c6312dfba960365771c64b937579a40e02ea5f7 (diff) | |
parent | 3f1805f8569337a21b72324d5edad329d5dfe872 (diff) |
Merge remote-tracking branch 'origin/5.8' into 5.9
Change-Id: Iff6ab3c287c58d8ec84a1513460bfce5218e8a61
Diffstat (limited to 'src/webenginewidgets/api/qwebenginepage.cpp')
-rw-r--r-- | src/webenginewidgets/api/qwebenginepage.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/webenginewidgets/api/qwebenginepage.cpp b/src/webenginewidgets/api/qwebenginepage.cpp index 2af3db414..8908af3c4 100644 --- a/src/webenginewidgets/api/qwebenginepage.cpp +++ b/src/webenginewidgets/api/qwebenginepage.cpp @@ -821,6 +821,8 @@ QWebEnginePage::QWebEnginePage(QWebEngineProfile *profile, QObject* parent) QWebEnginePage::~QWebEnginePage() { Q_D(QWebEnginePage); + if (d->adapter) + d->adapter->stopFinding(); QWebEngineViewPrivate::bind(d->view, 0); } @@ -842,7 +844,7 @@ QWebEngineSettings *QWebEnginePage::settings() const * that is exposed in the JavaScript context of this page as \c qt.webChannelTransport. * * \since 5.5 - * \sa setWebChannel + * \sa setWebChannel() */ QWebChannel *QWebEnginePage::webChannel() const { @@ -1455,7 +1457,7 @@ void QWebEnginePagePrivate::javascriptDialog(QSharedPointer<JavaScriptDialogCont controller->textProvided(promptResult); break; case UnloadDialog: - accepted = (QMessageBox::information(view, QCoreApplication::translate("QWebEnginePage", "Are you sure you want to leave this page?"), controller->message(), QMessageBox::Yes, QMessageBox::No) == QMessageBox::Yes); + accepted = (QMessageBox::question(view, QCoreApplication::translate("QWebEnginePage", "Are you sure you want to leave this page?"), QCoreApplication::translate("QWebEnginePage", "Changes that you made may not be saved."), QMessageBox::Ok, QMessageBox::Cancel) == QMessageBox::Ok); break; case InternalAuthorizationDialog: accepted = (QMessageBox::question(view, controller->title(), controller->message(), QMessageBox::Yes, QMessageBox::No) == QMessageBox::Yes); @@ -1632,6 +1634,8 @@ QMenu *QWebEnginePage::createStandardContextMenu() if (d->isFullScreenMode()) menu->addAction(QWebEnginePage::action(ExitFullScreen)); + menu->setAttribute(Qt::WA_DeleteOnClose, true); + return menu; } |