From c8e5d788936059254e81377e6318ee9e975c1040 Mon Sep 17 00:00:00 2001 From: Joona Petrell Date: Thu, 1 Apr 2010 12:40:48 +1000 Subject: Fix plugin example compilation on Symbian arm Task-number: QTBUG-9520 Reviewed-by: Martin Jones --- examples/declarative/plugins/plugin.cpp | 18 +++++++----------- examples/declarative/plugins/plugins.pro | 7 ++++++- 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/examples/declarative/plugins/plugin.cpp b/examples/declarative/plugins/plugin.cpp index 741f68a..fb51b0c 100644 --- a/examples/declarative/plugins/plugin.cpp +++ b/examples/declarative/plugins/plugin.cpp @@ -46,7 +46,7 @@ #include #include -// Implements a "Time" class with hour and minute properties +// Implements a "TimeModel" class with hour and minute properties // that change on-the-minute yet efficiently sleep the rest // of the time. @@ -97,14 +97,14 @@ private: QBasicTimer timer; }; -class Time : public QObject +class TimeModel : public QObject { Q_OBJECT Q_PROPERTY(int hour READ hour NOTIFY timeChanged) Q_PROPERTY(int minute READ minute NOTIFY timeChanged) public: - Time(QObject *parent=0) : QObject(parent) + TimeModel(QObject *parent=0) : QObject(parent) { if (++instances == 1) { if (!timer) @@ -114,7 +114,7 @@ public: } } - ~Time() + ~TimeModel() { if (--instances == 0) { timer->stop(); @@ -133,12 +133,8 @@ private: static int instances; }; -int Time::instances=0; -MinuteTimer *Time::timer=0; - - -QML_DECLARE_TYPE(Time); - +int TimeModel::instances=0; +MinuteTimer *TimeModel::timer=0; class QExampleQmlPlugin : public QDeclarativeExtensionPlugin { @@ -147,7 +143,7 @@ public: void registerTypes(const char *uri) { Q_ASSERT(uri == QLatin1String("com.nokia.TimeExample")); - qmlRegisterType