diff options
author | Joona Petrell <joona.t.petrell@nokia.com> | 2010-04-01 02:40:48 (GMT) |
---|---|---|
committer | Joona Petrell <joona.t.petrell@nokia.com> | 2010-04-01 02:45:19 (GMT) |
commit | c8e5d788936059254e81377e6318ee9e975c1040 (patch) | |
tree | 615a7367215047c55842f651c97597a0372ece66 /examples | |
parent | 5631e6311e068670781f0d6804cbfbc2d929b367 (diff) | |
download | Qt-c8e5d788936059254e81377e6318ee9e975c1040.zip Qt-c8e5d788936059254e81377e6318ee9e975c1040.tar.gz Qt-c8e5d788936059254e81377e6318ee9e975c1040.tar.bz2 |
Fix plugin example compilation on Symbian arm
Task-number: QTBUG-9520
Reviewed-by: Martin Jones
Diffstat (limited to 'examples')
-rw-r--r-- | examples/declarative/plugins/plugin.cpp | 18 | ||||
-rw-r--r-- | 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 <qbasictimer.h> #include <qapplication.h> -// 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<Time>(uri, 1, 0, "Time"); + qmlRegisterType<TimeModel>(uri, 1, 0, "Time"); } }; diff --git a/examples/declarative/plugins/plugins.pro b/examples/declarative/plugins/plugins.pro index 877a5ce..c409d39 100644 --- a/examples/declarative/plugins/plugins.pro +++ b/examples/declarative/plugins/plugins.pro @@ -8,7 +8,7 @@ VERSION = 1.0.0 SOURCES += plugin.cpp qdeclarativesources.files += \ - com/nokia/TimeExample/qdeclarativedir \ + com/nokia/TimeExample/qmldir \ com/nokia/TimeExample/center.png \ com/nokia/TimeExample/clock.png \ com/nokia/TimeExample/Clock.qml \ @@ -22,6 +22,11 @@ sources.path += $$[QT_INSTALL_EXAMPLES]/declarative/plugins target.path += $$[QT_INSTALL_EXAMPLES]/declarative/plugins/com/nokia/TimeExample +symbian:{ + TARGET.EPOCALLOWDLLDATA=1 +} + + INSTALLS += qdeclarativesources sources target symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) |