summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@theqtcompany.com>2016-04-12 11:57:06 +0200
committerAllan Sandfeld Jensen <allan.jensen@theqtcompany.com>2016-04-13 09:10:54 +0000
commitd27fc2d9884e83fbfa9bc31a5c560d2b4d9197b5 (patch)
tree55365d63e37ea549480d6eaf51a762fad76e35ea
parenta3d2ee4eabc4e491ac64976aea47c2bdf650cabe (diff)
Move QQuickWebEngineContextMenuData to experimental
We have no good way of using it in 5.7 as users can't replace context menus directly anyway. Instead we keep it as experimental until it is useful. Change-Id: I91ca0c210e190debdc62db8de9de2ebee0784d3b Reviewed-by: Michael BrĂ¼ning <michael.bruning@theqtcompany.com>
-rw-r--r--src/webengine/api/qquickwebengineview.cpp4
-rw-r--r--src/webengine/api/qquickwebengineview_p.h4
-rw-r--r--src/webengine/api/qquickwebengineview_p_p.h4
-rw-r--r--src/webengine/plugin/experimental/plugin.cpp3
-rw-r--r--src/webengine/plugin/plugin.cpp3
5 files changed, 9 insertions, 9 deletions
diff --git a/src/webengine/api/qquickwebengineview.cpp b/src/webengine/api/qquickwebengineview.cpp
index a3d37f83a..4fe6eb939 100644
--- a/src/webengine/api/qquickwebengineview.cpp
+++ b/src/webengine/api/qquickwebengineview.cpp
@@ -195,7 +195,7 @@ bool QQuickWebEngineViewPrivate::contextMenuRequested(const WebEngineContextMenu
return false;
contextMenuData.update(data);
- Q_EMIT q->contextMenuDataChanged();
+ Q_EMIT q->experimental()->contextMenuDataChanged();
// Populate our menu
MenuItemHandler *item = 0;
@@ -1602,7 +1602,7 @@ void QQuickWebEngineView::triggerWebAction(WebAction action)
}
}
-const QQuickWebEngineContextMenuData *QQuickWebEngineView::contextMenuData() const
+const QQuickWebEngineContextMenuData *QQuickWebEngineViewExperimental::contextMenuData() const
{
Q_D(const QQuickWebEngineView);
return &d->contextMenuData;
diff --git a/src/webengine/api/qquickwebengineview_p.h b/src/webengine/api/qquickwebengineview_p.h
index 065e7c529..2a4563d70 100644
--- a/src/webengine/api/qquickwebengineview_p.h
+++ b/src/webengine/api/qquickwebengineview_p.h
@@ -117,7 +117,6 @@ class Q_WEBENGINE_PRIVATE_EXPORT QQuickWebEngineView : public QQuickItem {
Q_PROPERTY(bool audioMuted READ isAudioMuted WRITE setAudioMuted NOTIFY audioMutedChanged FINAL REVISION 3)
Q_PROPERTY(bool recentlyAudible READ recentlyAudible NOTIFY recentlyAudibleChanged FINAL REVISION 3)
Q_PROPERTY(uint webChannelWorld READ webChannelWorld WRITE setWebChannelWorld NOTIFY webChannelWorldChanged REVISION 3)
- Q_PROPERTY(const QQuickWebEngineContextMenuData *contextMenuData READ contextMenuData NOTIFY contextMenuDataChanged CONSTANT REVISION 3)
#ifdef ENABLE_QML_TESTSUPPORT_API
Q_PROPERTY(QQuickWebEngineTestSupport *testSupport READ testSupport WRITE setTestSupport FINAL)
@@ -450,8 +449,6 @@ public:
void setAudioMuted(bool muted);
bool recentlyAudible() const;
- const QQuickWebEngineContextMenuData *contextMenuData() const;
-
#ifdef ENABLE_QML_TESTSUPPORT_API
QQuickWebEngineTestSupport *testSupport() const;
void setTestSupport(QQuickWebEngineTestSupport *testSupport);
@@ -510,7 +507,6 @@ Q_SIGNALS:
Q_REVISION(3) void audioMutedChanged(bool muted);
Q_REVISION(3) void recentlyAudibleChanged(bool recentlyAudible);
Q_REVISION(3) void webChannelWorldChanged(uint);
- Q_REVISION(3) void contextMenuDataChanged();
protected:
void geometryChanged(const QRectF &newGeometry, const QRectF &oldGeometry);
diff --git a/src/webengine/api/qquickwebengineview_p_p.h b/src/webengine/api/qquickwebengineview_p_p.h
index 7f0dcc337..d240e3e50 100644
--- a/src/webengine/api/qquickwebengineview_p_p.h
+++ b/src/webengine/api/qquickwebengineview_p_p.h
@@ -98,13 +98,17 @@ class Q_WEBENGINE_PRIVATE_EXPORT QQuickWebEngineViewExperimental : public QObjec
Q_OBJECT
Q_PROPERTY(QQuickWebEngineViewport *viewport READ viewport)
Q_PROPERTY(QQmlComponent *extraContextMenuEntriesComponent READ extraContextMenuEntriesComponent WRITE setExtraContextMenuEntriesComponent NOTIFY extraContextMenuEntriesComponentChanged)
+ Q_PROPERTY(const QQuickWebEngineContextMenuData *contextMenuData READ contextMenuData NOTIFY contextMenuDataChanged)
QQuickWebEngineViewport *viewport() const;
void setExtraContextMenuEntriesComponent(QQmlComponent *);
QQmlComponent *extraContextMenuEntriesComponent() const;
+ const QQuickWebEngineContextMenuData *contextMenuData() const;
+
Q_SIGNALS:
void extraContextMenuEntriesComponentChanged();
+ void contextMenuDataChanged();
private:
QQuickWebEngineViewExperimental(QQuickWebEngineViewPrivate* viewPrivate);
diff --git a/src/webengine/plugin/experimental/plugin.cpp b/src/webengine/plugin/experimental/plugin.cpp
index 35666017a..c45bcee43 100644
--- a/src/webengine/plugin/experimental/plugin.cpp
+++ b/src/webengine/plugin/experimental/plugin.cpp
@@ -41,6 +41,7 @@
#include "qquickwebengineview_p.h"
#include "qquickwebengineview_p_p.h"
+#include "qquickwebenginecontextmenudata_p.h"
QT_BEGIN_NAMESPACE
@@ -69,6 +70,8 @@ public:
tr("Cannot create a separate instance of WebEngineViewExperimental"));
qmlRegisterUncreatableType<QQuickWebEngineViewport>(uri, 1, 0, "WebEngineViewport",
tr("Cannot create a separate instance of WebEngineViewport"));
+ qmlRegisterUncreatableType<const QQuickWebEngineContextMenuData>(uri, 1, 0, "WebEngineContextMenuData",
+ tr("Cannot create a separate instance of WebEngineContextMenuData"));
// Use the latest revision of QQuickWebEngineView when importing QtWebEngine.experimental 1.0
qmlRegisterRevision<QQuickWebEngineView, LATEST_WEBENGINEVIEW_REVISION>(uri, 1, 0);
diff --git a/src/webengine/plugin/plugin.cpp b/src/webengine/plugin/plugin.cpp
index a33b543ac..fc8e40bd0 100644
--- a/src/webengine/plugin/plugin.cpp
+++ b/src/webengine/plugin/plugin.cpp
@@ -41,7 +41,6 @@
#include <QtWebEngine/QQuickWebEngineProfile>
#include "qquickwebenginecertificateerror_p.h"
-#include "qquickwebenginecontextmenudata_p.h"
#include "qquickwebenginedownloaditem_p.h"
#include "qquickwebenginehistory_p.h"
#include "qquickwebengineloadrequest_p.h"
@@ -80,8 +79,6 @@ public:
qmlRegisterType<QQuickWebEngineProfile, 2>(uri, 1, 3, "WebEngineProfile");
qmlRegisterType<QQuickWebEngineScript>(uri, 1, 1, "WebEngineScript");
qmlRegisterUncreatableType<QQuickWebEngineCertificateError>(uri, 1, 1, "WebEngineCertificateError", tr("Cannot create separate instance of WebEngineCertificateError"));
- qmlRegisterUncreatableType<const QQuickWebEngineContextMenuData>(uri, 1, 3, "WebEngineContextMenuData",
- tr("Cannot create a separate instance of WebEngineContextMenuData"));
qmlRegisterUncreatableType<QQuickWebEngineDownloadItem>(uri, 1, 1, "WebEngineDownloadItem",
tr("Cannot create a separate instance of WebEngineDownloadItem"));
qmlRegisterUncreatableType<QQuickWebEngineDownloadItem, 1>(uri, 1, 2, "WebEngineDownloadItem",