summaryrefslogtreecommitdiffstats
path: root/src/webengine/api
diff options
context:
space:
mode:
authorMichael BrĂ¼ning <michael.bruning@qt.io>2018-12-14 13:15:31 +0100
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2018-12-18 15:58:19 +0100
commit50fac0d1d7e82f2423e0a3e557b4a1f30be5bf33 (patch)
treeb085f03fdafa4ecbcfcb5a96b68404e155879b6a /src/webengine/api
parent8124f0bc1893e0997989913044665fa1c5cf79d7 (diff)
parent4f1e0003d98116e33a847360e0e95c46daae25fc (diff)
Merge remote-tracking branch 'origin/5.12' into dev
Conflicts: src/core/compositor/delegated_frame_node.cpp src/core/profile_adapter.cpp src/core/profile_io_data_qt.cpp src/webengine/api/qquickwebengineprofile.cpp src/webenginewidgets/api/qwebengineprofile.cpp Change-Id: I35ec8480e758bbcb6c5942a5401cb1b6dbdcc428
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 508106583..22202cc97 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
@@ -904,7 +906,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);
}