aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIvan Tkachenko <me@ratijas.tk>2020-05-14 20:18:43 +0300
committerQt Cherry-pick Bot <cherrypickbot@codereview.qt-project.org>2020-05-15 08:27:53 +0000
commit5e82f0731d1c9646cef1e4bb4641867f560a3dc1 (patch)
tree692f499da913f593ed92e393b6502af645c7fc78
parent645cfaef177fd5962ab1536bc06326a55d4a49e2 (diff)
Fix Qt.labs.platform/MenuItem 1.1: expose icon
[ChangeLog][Platform][MenuItem] Expose MenuItem.icon.* property when imported as revision 1, which was erroneously not exposed at all. Task-number: QTBUG-84102 Change-Id: I6d400c7d4e222b67c99b6f5a95ac66e0851630f2 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> (cherry picked from commit 8fdcde54e65f92a04c7165677e85168ceed1d20b) Reviewed-by: Qt Cherry-pick Bot
-rw-r--r--src/imports/platform/platform.pro2
-rw-r--r--src/imports/platform/plugins.qmltypes9
-rw-r--r--src/imports/platform/qtlabsplatformplugin.cpp1
3 files changed, 8 insertions, 4 deletions
diff --git a/src/imports/platform/platform.pro b/src/imports/platform/platform.pro
index 043b0172..06f34949 100644
--- a/src/imports/platform/platform.pro
+++ b/src/imports/platform/platform.pro
@@ -1,6 +1,6 @@
TARGET = qtlabsplatformplugin
TARGETPATH = Qt/labs/platform
-IMPORT_VERSION = 1.0
+IMPORT_VERSION = 1.1
QT += qml quick
QT_PRIVATE += core-private gui-private qml-private quick-private
diff --git a/src/imports/platform/plugins.qmltypes b/src/imports/platform/plugins.qmltypes
index 7b165ef3..e9312047 100644
--- a/src/imports/platform/plugins.qmltypes
+++ b/src/imports/platform/plugins.qmltypes
@@ -4,7 +4,7 @@ import QtQuick.tooling 1.2
// It is used for QML tooling purposes only.
//
// This file was auto-generated by:
-// 'qmlplugindump -nonrelocatable Qt.labs.platform 1.0'
+// 'qmlplugindump -nonrelocatable Qt.labs.platform 1.1'
Module {
dependencies: ["QtQuick 2.0"]
@@ -288,8 +288,11 @@ Module {
Component {
name: "QQuickPlatformMenuItem"
prototype: "QObject"
- exports: ["Qt.labs.platform/MenuItem 1.0"]
- exportMetaObjectRevisions: [0]
+ exports: [
+ "Qt.labs.platform/MenuItem 1.0",
+ "Qt.labs.platform/MenuItem 1.1"
+ ]
+ exportMetaObjectRevisions: [0, 1]
Property { name: "menu"; type: "QQuickPlatformMenu"; isReadonly: true; isPointer: true }
Property { name: "subMenu"; type: "QQuickPlatformMenu"; isReadonly: true; isPointer: true }
Property { name: "group"; type: "QQuickPlatformMenuItemGroup"; isPointer: true }
diff --git a/src/imports/platform/qtlabsplatformplugin.cpp b/src/imports/platform/qtlabsplatformplugin.cpp
index 98d5dcc4..90bdb121 100644
--- a/src/imports/platform/qtlabsplatformplugin.cpp
+++ b/src/imports/platform/qtlabsplatformplugin.cpp
@@ -91,6 +91,7 @@ void QtLabsPlatformPlugin::registerTypes(const char *uri)
qmlRegisterType<QQuickPlatformMenu>(uri, 1, 0, "Menu");
qmlRegisterType<QQuickPlatformMenuBar>(uri, 1, 0, "MenuBar");
qmlRegisterType<QQuickPlatformMenuItem>(uri, 1, 0, "MenuItem");
+ qmlRegisterType<QQuickPlatformMenuItem, 1>(uri, 1, 1, "MenuItem");
qmlRegisterType<QQuickPlatformMenuItemGroup>(uri, 1, 0, "MenuItemGroup");
qmlRegisterType<QQuickPlatformMenuSeparator>(uri, 1, 0, "MenuSeparator");
qRegisterMetaType<QPlatformMenu::MenuType>();