summaryrefslogtreecommitdiff
path: root/src/webengine/api/qquickwebengineview.cpp
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@theqtcompany.com>2016-05-31 11:40:56 +0000
committerThe Qt Project <gerrit-noreply@qt-project.org>2016-05-31 13:10:16 +0000
commitb987250dc87bc64c735e9936e8cf847cde341f40 (patch)
tree66d0d6dc8d918336eac93565cc2de3643062c3af /src/webengine/api/qquickwebengineview.cpp
parent3af17048cbd64fff17eedc340571e7555ea9790a (diff)
parentd2d5d24f86f12a2d1b0a6bc46c0d48306d7d2130 (diff)
downloadqtwebengine-b987250dc87bc64c735e9936e8cf847cde341f40.tar.gz
Merge "Merge remote-tracking branch 'origin/5.6' into 5.7" into refs/staging/5.7
Diffstat (limited to 'src/webengine/api/qquickwebengineview.cpp')
-rw-r--r--src/webengine/api/qquickwebengineview.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/webengine/api/qquickwebengineview.cpp b/src/webengine/api/qquickwebengineview.cpp
index 391fa585d..59b5d17db 100644
--- a/src/webengine/api/qquickwebengineview.cpp
+++ b/src/webengine/api/qquickwebengineview.cpp
@@ -124,6 +124,8 @@ QQuickWebEngineViewPrivate::QQuickWebEngineViewPrivate()
, m_dpiScale(1.0)
, m_backgroundColor(Qt::white)
, m_defaultZoomFactor(1.0)
+ // QTBUG-53467
+ , m_menuEnabled(true)
{
// The gold standard for mobile web content is 160 dpi, and the devicePixelRatio expected
// is the (possibly quantized) ratio of device dpi to 160 dpi.
@@ -141,6 +143,8 @@ QQuickWebEngineViewPrivate::QQuickWebEngineViewPrivate()
// 1x, 2x, 3x etc assets that fit an integral number of pixels.
setDevicePixelRatio(qMax(1, qRound(webPixelRatio)));
}
+ if (platform == QLatin1Literal("eglfs"))
+ m_menuEnabled = false;
#ifndef QT_NO_ACCESSIBILITY
QAccessible::installFactory(&webAccessibleFactory);
#endif // QT_NO_ACCESSIBILITY
@@ -191,6 +195,12 @@ bool QQuickWebEngineViewPrivate::contextMenuRequested(const WebEngineContextMenu
{
Q_Q(QQuickWebEngineView);
+ if (!m_menuEnabled) {
+ qWarning("You are trying to open context menu on eglfs backend, which is not currently supported\n"
+ "See QTBUG-53467.");
+ return false;
+ }
+
// Assign the WebEngineView as the parent of the menu, so mouse events are properly propagated
// on OSX.
QObject *menu = ui()->addMenu(q, QString(), data.pos);
@@ -1075,6 +1085,12 @@ void QQuickWebEngineViewPrivate::startDragging(const content::DropData &dropData
adapter->startDragging(q_ptr->window(), dropData, allowedActions, pixmap, offset);
}
+bool QQuickWebEngineViewPrivate::isEnabled() const
+{
+ const Q_Q(QQuickWebEngineView);
+ return q->isEnabled();
+}
+
bool QQuickWebEngineView::isLoading() const
{
Q_D(const QQuickWebEngineView);