diff options
author | Ulf Hermann <[email protected]> | 2019-09-12 17:03:52 +0200 |
---|---|---|
committer | Ulf Hermann <[email protected]> | 2020-01-13 16:47:57 +0100 |
commit | 2c3419e127e55810da1741725b4ff39f118cd577 (patch) | |
tree | 670ec93d28dadad06bd840a5694935ef8a7b2ac0 /examples/quick/customitems/painteditem | |
parent | 4eff7299501ff932071300b3fa34fbeccb03d0d8 (diff) |
Generate registrations for all examples
Now that we can generate all QML type information at build time, we
should also use it.
Change-Id: I647c72bbe38fdb2deb565b75c86a696af3d15b61
Reviewed-by: Simon Hausmann <[email protected]>
Diffstat (limited to 'examples/quick/customitems/painteditem')
-rw-r--r-- | examples/quick/customitems/painteditem/TextBalloonPlugin/plugin.h | 9 | ||||
-rw-r--r-- | examples/quick/customitems/painteditem/painteditem.pro | 16 |
2 files changed, 12 insertions, 13 deletions
diff --git a/examples/quick/customitems/painteditem/TextBalloonPlugin/plugin.h b/examples/quick/customitems/painteditem/TextBalloonPlugin/plugin.h index 41750d1647..972859f80e 100644 --- a/examples/quick/customitems/painteditem/TextBalloonPlugin/plugin.h +++ b/examples/quick/customitems/painteditem/TextBalloonPlugin/plugin.h @@ -52,13 +52,8 @@ #include "../textballoon.h" -class TextBalloonPlugin : public QQmlExtensionPlugin +class TextBalloonPlugin : public QQmlEngineExtensionPlugin { Q_OBJECT - Q_PLUGIN_METADATA(IID QQmlExtensionInterface_iid) -public: - void registerTypes(const char *uri) - { - qmlRegisterTypesAndRevisions<TextBalloon>(uri, 1); - } + Q_PLUGIN_METADATA(IID QQmlEngineExtensionInterface_iid) }; diff --git a/examples/quick/customitems/painteditem/painteditem.pro b/examples/quick/customitems/painteditem/painteditem.pro index bc7480ab9e..641833f3aa 100644 --- a/examples/quick/customitems/painteditem/painteditem.pro +++ b/examples/quick/customitems/painteditem/painteditem.pro @@ -1,21 +1,25 @@ TEMPLATE = lib -CONFIG += plugin +CONFIG += plugin qmltypes QT += qml quick +QML_IMPORT_NAME = TextBalloonPlugin +QML_IMPORT_MAJOR_VERSION = 1 + TARGET = qmltextballoonplugin -HEADERS += TextBalloonPlugin/plugin.h \ +HEADERS += \ + TextBalloonPlugin/plugin.h \ textballoon.h SOURCES += textballoon.cpp RESOURCES += painteditem.qrc -DESTDIR = TextBalloonPlugin +DESTDIR = $$QML_IMPORT_NAME -target.path = $$[QT_INSTALL_EXAMPLES]/quick/customitems/painteditem/TextBalloonPlugin -qmldir.files = TextBalloonPlugin/qmldir -qmldir.path = $$[QT_INSTALL_EXAMPLES]/quick/customitems/painteditem/TextBalloonPlugin +target.path = $$[QT_INSTALL_EXAMPLES]/quick/customitems/painteditem/$$QML_IMPORT_NAME +qmldir.files = $$QML_IMPORT_NAME/qmldir +qmldir.path = $$[QT_INSTALL_EXAMPLES]/quick/customitems/painteditem/$$QML_IMPORT_NAME INSTALLS += qmldir target |