diff options
Diffstat (limited to 'examples')
-rw-r--r-- | examples/declarative/plugins/plugin.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/examples/declarative/plugins/plugin.cpp b/examples/declarative/plugins/plugin.cpp index 9688caf..f4aa36b 100644 --- a/examples/declarative/plugins/plugin.cpp +++ b/examples/declarative/plugins/plugin.cpp @@ -138,7 +138,6 @@ MinuteTimer *Time::timer=0; QML_DECLARE_TYPE(Time); -QML_DEFINE_TYPE(com.nokia.TimeExample,1,0,Time,Time); class QExampleQmlPlugin : public QmlModulePlugin @@ -149,6 +148,12 @@ public: { return QStringList() << QLatin1String("com.nokia.TimeExample"); } + + void defineModule(const QString& uri) + { + Q_ASSERT(uri == QLatin1String("com.nokia.TimeExample")); + qmlRegisterType<Time>("com.nokia.TimeExample", 1, 0, "Time", "Time"); + } }; #include "plugin.moc" |