diff options
author | Olivier Tilloy <olivier.tilloy@canonical.com> | 2012-10-04 12:04:46 +0200 |
---|---|---|
committer | Olivier Tilloy <olivier.tilloy@canonical.com> | 2012-10-04 12:04:46 +0200 |
commit | 36426c5ef4e8d3c8e850996c447d6999e21479c6 (patch) | |
tree | c4d0e3c5572a9e344050ea240ce6d677cc8290e2 /src/QMenuModel | |
parent | a9416ebfa48082278abd2a237964989334fc24c5 (diff) | |
download | qmenumodel-36426c5ef4e8d3c8e850996c447d6999e21479c6.tar.gz qmenumodel-36426c5ef4e8d3c8e850996c447d6999e21479c6.tar.bz2 qmenumodel-36426c5ef4e8d3c8e850996c447d6999e21479c6.zip |
Move the enums into a class that inherits QObject, so they can be exposed and used directly from QML.
Diffstat (limited to 'src/QMenuModel')
-rw-r--r-- | src/QMenuModel/plugin.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/QMenuModel/plugin.cpp b/src/QMenuModel/plugin.cpp index 494dd2c..ec51ae9 100644 --- a/src/QMenuModel/plugin.cpp +++ b/src/QMenuModel/plugin.cpp @@ -32,6 +32,8 @@ void QMenuModelQmlPlugin::registerTypes(const char *uri) "QMenuModel is a interface"); qmlRegisterUncreatableType<QStateAction>(uri, 0, 1, "QStateAction", "QStateAction must be created by QDBusActionGroup::action"); + qmlRegisterUncreatableType<DBusEnums>(uri, 0, 1, "DBus", + "DBus is only a namespace"); qmlRegisterType<QDBusMenuModel>(uri, 0, 1, "QDBusMenuModel"); qmlRegisterType<QDBusActionGroup>(uri, 0, 1, "QDBusActionGroup"); |