summaryrefslogtreecommitdiff
path: root/src/controls/plugin.cpp
diff options
context:
space:
mode:
authorGabriel de Dietrich <gabriel.dedietrich@digia.com>2013-03-20 15:22:08 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-03-20 17:16:42 +0100
commitbdc872955933aaf93cdd434cc17cc29630600b88 (patch)
treea5c40c6bb82a30f7e1c31dde8ce3ec33ac61ee1a /src/controls/plugin.cpp
parent8d5e9969b54f80e646cc2b9fcc92e1f36da6d128 (diff)
downloadqtquickcontrols-bdc872955933aaf93cdd434cc17cc29630600b88.tar.gz
Menu: Update API, auto-tests
Add 'type' property to QtMenuBase (not exposed to QML explicitly, but is the base class for all things menu). Useful to inspect menu items after creation, for instance. Also, Menu gets addSeparator() and addMenu() functions. Since the Iterator type has been merged to QML, tst_menu now uses it. Change-Id: I4a2f43ecce6671885e523d720e4e1315eca8616e Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Diffstat (limited to 'src/controls/plugin.cpp')
-rw-r--r--src/controls/plugin.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/controls/plugin.cpp b/src/controls/plugin.cpp
index b7dd36cd..50c8fe69 100644
--- a/src/controls/plugin.cpp
+++ b/src/controls/plugin.cpp
@@ -82,6 +82,8 @@ void StylePlugin::registerTypes(const char *uri)
qmlRegisterType<QtMenu>(uri, 1, 0, "MenuPrivate");
qmlRegisterType<QtMenuBar>(uri, 1, 0, "MenuBarPrivate");
qmlRegisterType<QtMenuItem>(uri, 1, 0, "MenuItem");
+ qmlRegisterUncreatableType<QtMenuItemType>(uri, 1, 0, "MenuItemType",
+ QLatin1String("Do not create objects of type MenuItemType"));
qmlRegisterType<QtMenuSeparator>(uri, 1, 0, "MenuSeparator");
qmlRegisterUncreatableType<QtMenuBase>(uri, 1, 0, "MenuBase",
QLatin1String("Do not create objects of type MenuBase"));