aboutsummaryrefslogtreecommitdiffstats
path: root/examples/qml/qmlextensionplugins/plugin.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'examples/qml/qmlextensionplugins/plugin.cpp')
-rw-r--r--examples/qml/qmlextensionplugins/plugin.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/examples/qml/qmlextensionplugins/plugin.cpp b/examples/qml/qmlextensionplugins/plugin.cpp
index 4866106e4a..a6d1d3ff63 100644
--- a/examples/qml/qmlextensionplugins/plugin.cpp
+++ b/examples/qml/qmlextensionplugins/plugin.cpp
@@ -112,6 +112,7 @@ class TimeModel : public QObject
Q_OBJECT
Q_PROPERTY(int hour READ hour NOTIFY timeChanged)
Q_PROPERTY(int minute READ minute NOTIFY timeChanged)
+ QML_NAMED_ELEMENT(Time)
//![0]
public:
@@ -157,7 +158,7 @@ public:
void registerTypes(const char *uri) override
{
Q_ASSERT(uri == QLatin1String("TimeExample"));
- qmlRegisterType<TimeModel>(uri, 1, 0, "Time");
+ qmlRegisterTypesAndRevisions<TimeModel>(uri, 1);
}
};
//![plugin]