summaryrefslogtreecommitdiffstats
path: root/src/webengine/api
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2018-12-19 08:03:00 +0000
committerThe Qt Project <gerrit-noreply@qt-project.org>2018-12-19 08:03:00 +0000
commita8b73a1d045bd3d479ae3d7dc2e4fc32c4338a6e (patch)
treef72618c2351f539852becaab9664c30ae9463ea3 /src/webengine/api
parentc468dc5163bebf064c5593e5887a0bfd35eae32b (diff)
parent50fac0d1d7e82f2423e0a3e557b4a1f30be5bf33 (diff)
Merge "Merge remote-tracking branch 'origin/5.12' into dev" into refs/staging/dev
Diffstat (limited to 'src/webengine/api')
-rw-r--r--src/webengine/api/qquickwebengineaction.cpp5
-rw-r--r--src/webengine/api/qquickwebengineaction_p_p.h6
-rw-r--r--src/webengine/api/qquickwebengineprofile.cpp4
-rw-r--r--src/webengine/api/qquickwebengineview.cpp3
4 files changed, 11 insertions, 7 deletions
diff --git a/src/webengine/api/qquickwebengineaction.cpp b/src/webengine/api/qquickwebengineaction.cpp
index 16eef04d3..69a05f29b 100644
--- a/src/webengine/api/qquickwebengineaction.cpp
+++ b/src/webengine/api/qquickwebengineaction.cpp
@@ -50,7 +50,7 @@ QT_BEGIN_NAMESPACE
\inqmlmodule QtWebEngine
\since QtWebEngine 1.8
- \brief An action that represents a \l WebEngineView::WebAction
+ \brief An action that represents a \l WebEngineView::WebAction.
A WebEngineAction is returned by the \l WebEngineView::action()
method. It provides information about the action, such as
@@ -146,7 +146,8 @@ QString QQuickWebEngineAction::iconName() const
/*!
\qmlproperty bool WebEngineAction::enabled
- This property holds whether the action is enabled.
+ This property holds whether the action is enabled. Context-dependent
+ actions are always enabled.
*/
bool QQuickWebEngineAction::isEnabled() const
{
diff --git a/src/webengine/api/qquickwebengineaction_p_p.h b/src/webengine/api/qquickwebengineaction_p_p.h
index 4320f73e4..d2ead30e9 100644
--- a/src/webengine/api/qquickwebengineaction_p_p.h
+++ b/src/webengine/api/qquickwebengineaction_p_p.h
@@ -72,13 +72,13 @@ public:
void trigger();
-private:
- QQuickWebEngineAction *q_ptr;
-
QVariant m_data;
QString m_text;
QString m_iconName;
bool m_enabled;
+
+private:
+ QQuickWebEngineAction *q_ptr;
};
QT_END_NAMESPACE
diff --git a/src/webengine/api/qquickwebengineprofile.cpp b/src/webengine/api/qquickwebengineprofile.cpp
index 237334b67..1d93c5070 100644
--- a/src/webengine/api/qquickwebengineprofile.cpp
+++ b/src/webengine/api/qquickwebengineprofile.cpp
@@ -53,6 +53,8 @@
#include "renderer_host/user_resource_controller_host.h"
#include "web_engine_settings.h"
+#include <QtWebEngineCore/qwebengineurlscheme.h>
+
using QtWebEngineCore::ProfileAdapter;
QT_BEGIN_NAMESPACE
@@ -905,7 +907,7 @@ const QWebEngineUrlSchemeHandler *QQuickWebEngineProfile::urlSchemeHandler(const
/*!
Registers a handler \a handler for custom URL scheme \a scheme in the profile.
- It is recommended to first register the scheme with \l
+ It is necessary to first register the scheme with \l
QWebEngineUrlScheme::registerScheme at application startup.
*/
void QQuickWebEngineProfile::installUrlSchemeHandler(const QByteArray &scheme, QWebEngineUrlSchemeHandler *handler)
diff --git a/src/webengine/api/qquickwebengineview.cpp b/src/webengine/api/qquickwebengineview.cpp
index e2a8b562d..3659f35fa 100644
--- a/src/webengine/api/qquickwebengineview.cpp
+++ b/src/webengine/api/qquickwebengineview.cpp
@@ -2225,7 +2225,8 @@ void QQuickContextMenuBuilder::addMenuItem(ContextMenuItem menuItem)
m_view->d_ptr->ui()->addMenuSeparator(m_menu);
return;
}
- action->d_ptr->setEnabled(isMenuItemEnabled(menuItem));
+ // Set enabled property directly with avoiding binding loops caused by its notifier signal.
+ action->d_ptr->m_enabled = isMenuItemEnabled(menuItem);
m_view->d_ptr->ui()->addMenuItem(action, m_menu);
}