summaryrefslogtreecommitdiffstats
path: root/src/webenginewidgets/api
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2017-03-02 17:30:07 +0100
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2017-03-02 17:30:27 +0100
commitd058d6c9df1ff866e4259ca2989ad144bb01a1e0 (patch)
treed91f8c314c20781080819d100df6a9855b30fbfd /src/webenginewidgets/api
parent0c6312dfba960365771c64b937579a40e02ea5f7 (diff)
parent3f1805f8569337a21b72324d5edad329d5dfe872 (diff)
Merge remote-tracking branch 'origin/5.8' into 5.9
Diffstat (limited to 'src/webenginewidgets/api')
-rw-r--r--src/webenginewidgets/api/qwebenginedownloaditem.cpp4
-rw-r--r--src/webenginewidgets/api/qwebenginepage.cpp8
-rw-r--r--src/webenginewidgets/api/qwebenginescript.cpp4
-rw-r--r--src/webenginewidgets/api/qwebengineview.cpp1
4 files changed, 10 insertions, 7 deletions
diff --git a/src/webenginewidgets/api/qwebenginedownloaditem.cpp b/src/webenginewidgets/api/qwebenginedownloaditem.cpp
index 582f0308c..1950221c7 100644
--- a/src/webenginewidgets/api/qwebenginedownloaditem.cpp
+++ b/src/webenginewidgets/api/qwebenginedownloaditem.cpp
@@ -218,7 +218,7 @@ quint32 QWebEngineDownloadItem::id() const
This signal is emitted whenever the download's \a state changes.
- \sa state(), QWebEngineDownloadItem::DownloadState
+ \sa state(), DownloadState
*/
/*!
@@ -327,7 +327,7 @@ quint32 QWebEngineDownloadItem::id() const
/*!
Returns the download item's current state.
- \sa QWebEngineDownloadItem::DownloadState
+ \sa DownloadState
*/
QWebEngineDownloadItem::DownloadState QWebEngineDownloadItem::state() const
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;
}
diff --git a/src/webenginewidgets/api/qwebenginescript.cpp b/src/webenginewidgets/api/qwebenginescript.cpp
index 04a9d979a..d5247cde1 100644
--- a/src/webenginewidgets/api/qwebenginescript.cpp
+++ b/src/webenginewidgets/api/qwebenginescript.cpp
@@ -196,7 +196,7 @@ ASSERT_ENUMS_MATCH(QWebEngineScript::DocumentCreation, UserScript::DocumentEleme
* Returns the point in the loading process at which the script will be executed.
* The default value is QWebEngineScript::Deferred.
*
- * \sa setInjectionPoint
+ * \sa setInjectionPoint()
*/
QWebEngineScript::InjectionPoint QWebEngineScript::injectionPoint() const
{
@@ -205,7 +205,7 @@ QWebEngineScript::InjectionPoint QWebEngineScript::injectionPoint() const
/*!
* Sets the point at which to execute the script to be \a p.
*
- * \sa QWebEngineScript::InjectionPoint
+ * \sa InjectionPoint
*/
void QWebEngineScript::setInjectionPoint(QWebEngineScript::InjectionPoint p)
{
diff --git a/src/webenginewidgets/api/qwebengineview.cpp b/src/webenginewidgets/api/qwebengineview.cpp
index 58d805fcb..56948bb18 100644
--- a/src/webenginewidgets/api/qwebengineview.cpp
+++ b/src/webenginewidgets/api/qwebengineview.cpp
@@ -333,7 +333,6 @@ bool QWebEngineView::event(QEvent *ev)
void QWebEngineView::contextMenuEvent(QContextMenuEvent *event)
{
QMenu *menu = page()->createStandardContextMenu();
- connect(menu, &QMenu::aboutToHide, menu, &QObject::deleteLater);
menu->popup(event->globalPos());
}