aboutsummaryrefslogtreecommitdiffstats
path: root/examples/qml/referenceexamples/adding
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2019-09-12 17:03:52 +0200
committerUlf Hermann <ulf.hermann@qt.io>2020-01-13 16:47:57 +0100
commit2c3419e127e55810da1741725b4ff39f118cd577 (patch)
tree670ec93d28dadad06bd840a5694935ef8a7b2ac0 /examples/qml/referenceexamples/adding
parent4eff7299501ff932071300b3fa34fbeccb03d0d8 (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 <simon.hausmann@qt.io>
Diffstat (limited to 'examples/qml/referenceexamples/adding')
-rw-r--r--examples/qml/referenceexamples/adding/adding.pro4
-rw-r--r--examples/qml/referenceexamples/adding/main.cpp3
2 files changed, 4 insertions, 3 deletions
diff --git a/examples/qml/referenceexamples/adding/adding.pro b/examples/qml/referenceexamples/adding/adding.pro
index ae135c7925..a4a677c3c4 100644
--- a/examples/qml/referenceexamples/adding/adding.pro
+++ b/examples/qml/referenceexamples/adding/adding.pro
@@ -1,4 +1,8 @@
QT = core qml
+CONFIG += qmltypes
+
+QML_IMPORT_NAME = People
+QML_IMPORT_MAJOR_VERSION = 1
SOURCES += main.cpp \
person.cpp
diff --git a/examples/qml/referenceexamples/adding/main.cpp b/examples/qml/referenceexamples/adding/main.cpp
index ffd0e90c42..6c3920f04b 100644
--- a/examples/qml/referenceexamples/adding/main.cpp
+++ b/examples/qml/referenceexamples/adding/main.cpp
@@ -56,9 +56,6 @@
int main(int argc, char ** argv)
{
QCoreApplication app(argc, argv);
-//![0]
- qmlRegisterTypesAndRevisions<Person>("People", 1);
-//![0]
QQmlEngine engine;
QQmlComponent component(&engine, QUrl("qrc:example.qml"));