summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/declarative/plugins/com/nokia/TimeExample/Clock.qml (renamed from examples/declarative/plugins/files/Clock.qml)0
-rw-r--r--examples/declarative/plugins/com/nokia/TimeExample/center.png (renamed from examples/declarative/plugins/files/center.png)bin765 -> 765 bytes
-rw-r--r--examples/declarative/plugins/com/nokia/TimeExample/clock.png (renamed from examples/declarative/plugins/files/clock.png)bin20653 -> 20653 bytes
-rw-r--r--examples/declarative/plugins/com/nokia/TimeExample/hour.png (renamed from examples/declarative/plugins/files/hour.png)bin625 -> 625 bytes
-rw-r--r--examples/declarative/plugins/com/nokia/TimeExample/minute.png (renamed from examples/declarative/plugins/files/minute.png)bin625 -> 625 bytes
-rw-r--r--examples/declarative/plugins/plugin.cpp14
-rw-r--r--examples/declarative/plugins/plugins.pro13
7 files changed, 16 insertions, 11 deletions
diff --git a/examples/declarative/plugins/files/Clock.qml b/examples/declarative/plugins/com/nokia/TimeExample/Clock.qml
index 01ec686..01ec686 100644
--- a/examples/declarative/plugins/files/Clock.qml
+++ b/examples/declarative/plugins/com/nokia/TimeExample/Clock.qml
diff --git a/examples/declarative/plugins/files/center.png b/examples/declarative/plugins/com/nokia/TimeExample/center.png
index 7fbd802..7fbd802 100644
--- a/examples/declarative/plugins/files/center.png
+++ b/examples/declarative/plugins/com/nokia/TimeExample/center.png
Binary files differ
diff --git a/examples/declarative/plugins/files/clock.png b/examples/declarative/plugins/com/nokia/TimeExample/clock.png
index 462edac..462edac 100644
--- a/examples/declarative/plugins/files/clock.png
+++ b/examples/declarative/plugins/com/nokia/TimeExample/clock.png
Binary files differ
diff --git a/examples/declarative/plugins/files/hour.png b/examples/declarative/plugins/com/nokia/TimeExample/hour.png
index f8061a1..f8061a1 100644
--- a/examples/declarative/plugins/files/hour.png
+++ b/examples/declarative/plugins/com/nokia/TimeExample/hour.png
Binary files differ
diff --git a/examples/declarative/plugins/files/minute.png b/examples/declarative/plugins/com/nokia/TimeExample/minute.png
index 1297ec7..1297ec7 100644
--- a/examples/declarative/plugins/files/minute.png
+++ b/examples/declarative/plugins/com/nokia/TimeExample/minute.png
Binary files differ
diff --git a/examples/declarative/plugins/plugin.cpp b/examples/declarative/plugins/plugin.cpp
index 820d4eb..8e21263 100644
--- a/examples/declarative/plugins/plugin.cpp
+++ b/examples/declarative/plugins/plugin.cpp
@@ -39,7 +39,7 @@
**
****************************************************************************/
-#include <QtDeclarative/qmlmoduleplugin.h>
+#include <QtDeclarative/QmlExtensionPlugin>
#include <QtDeclarative/qml.h>
#include <qdebug.h>
#include <qdatetime.h>
@@ -140,19 +140,15 @@ MinuteTimer *Time::timer=0;
QML_DECLARE_TYPE(Time);
-class QExampleQmlPlugin : public QmlModulePlugin
+class QExampleQmlPlugin : public QmlExtensionPlugin
{
Q_OBJECT
public:
- QStringList keys() const
- {
- return QStringList() << QLatin1String("com.nokia.TimeExample");
- }
-
- void defineModule(const QString& uri)
+ void initialize(QmlEngine *engine, const char *uri)
{
+ Q_UNUSED(engine);
Q_ASSERT(uri == QLatin1String("com.nokia.TimeExample"));
- qmlRegisterType<Time>("com.nokia.TimeExample", 1, 0, "Time", "Time");
+ qmlRegisterType<Time>(uri, 1, 0, "Time", "Time");
}
};
diff --git a/examples/declarative/plugins/plugins.pro b/examples/declarative/plugins/plugins.pro
index 84ab8da..d932b01 100644
--- a/examples/declarative/plugins/plugins.pro
+++ b/examples/declarative/plugins/plugins.pro
@@ -1,4 +1,5 @@
TEMPLATE = lib
+DESTDIR = com/nokia/TimeExample
TARGET = qtimeexampleqmlplugin
CONFIG += qt plugin
QT += declarative
@@ -6,10 +7,18 @@ QT += declarative
SOURCES += plugin.cpp
target.path += $$[QT_INSTALL_PLUGINS]/qmlmodules
-sources.files += files/Clock.qml files/qmldir files/background.png files/center.png files/clock-night.png files/clock.png files/hour.png files/minute.png
+
+sources.files += \
+ $$PWD/com/nokia/TimeExample/qmldir \
+ $$PWD/com/nokia/TimeExample/center.png \
+ $$PWD/com/nokia/TimeExample/clock.png \
+ $$PWD/com/nokia/TimeExample/Clock.qml \
+ $$PWD/com/nokia/TimeExample/hour.png \
+ $$PWD/com/nokia/TimeExample/minute.png
+
sources.path += $$[QT_INSTALL_DATA]/qml/com/nokia/TimeExample
-INSTALLS += target sources
+INSTALLS += target sources
VERSION=1.0.0