diff options
author | Dominik Holland <dominik.holland@pelagicore.com> | 2019-01-31 11:14:26 +0100 |
---|---|---|
committer | Dominik Holland <dominik.holland@pelagicore.com> | 2019-02-15 10:51:25 +0000 |
commit | 906ae2192e55aa6bdf251ec120b54016bc9e2477 (patch) | |
tree | f15b55093d31e607458deea01688757129dbd8d0 /examples | |
parent | 1ccc6fdbed233d46a9deed8e798326c70631913e (diff) | |
download | qtivi-906ae2192e55aa6bdf251ec120b54016bc9e2477.tar.gz |
Use the new autogenerated qmltypes in our examples
Instead of registering the QML types with a custom uri, we now
just use the default argument of the type registration and by
that make sure that the types are registered with the same uri
which was used in the qface file and the same which is used
by the autogenerated qml types.
Adding the QML_IMPORT_PATH to our autogenerated qmltypes makes
sure QtCreator knows the type and can provide a code-completion
Change-Id: Ifd4ce8ec32da240ccf0070b737fd02c17f8fe2dc
Fixes: AUTOSUITE-743
Reviewed-by: Robert Griebl <robert.griebl@pelagicore.com>
Diffstat (limited to 'examples')
9 files changed, 9 insertions, 9 deletions
diff --git a/examples/ivicore/qface-ivi-addressbook/demo/demo.pro b/examples/ivicore/qface-ivi-addressbook/demo/demo.pro index 7905c88..66861c4 100644 --- a/examples/ivicore/qface-ivi-addressbook/demo/demo.pro +++ b/examples/ivicore/qface-ivi-addressbook/demo/demo.pro @@ -17,7 +17,7 @@ RESOURCES += qml.qrc QMAKE_RPATHDIR += $ORIGIN # Additional import path used to resolve QML modules in Qt Creator's code model -QML_IMPORT_PATH = +QML_IMPORT_PATH = $$OUT_PWD/../frontend/qml # Additional import path used to resolve QML modules just for Qt Quick Designer QML_DESIGNER_IMPORT_PATH = diff --git a/examples/ivicore/qface-ivi-addressbook/demo/main.cpp b/examples/ivicore/qface-ivi-addressbook/demo/main.cpp index f5d4d87..8cbae34 100644 --- a/examples/ivicore/qface-ivi-addressbook/demo/main.cpp +++ b/examples/ivicore/qface-ivi-addressbook/demo/main.cpp @@ -62,7 +62,7 @@ int main(int argc, char *argv[]) QGuiApplication app(argc, argv); AddressBookModule::registerTypes(); - AddressBookModule::registerQmlTypes(QLatin1String("IviAddressBook"), 1, 0); + AddressBookModule::registerQmlTypes(); QQuickStyle::setStyle(QStringLiteral("Material")); diff --git a/examples/ivicore/qface-ivi-addressbook/demo/main.qml b/examples/ivicore/qface-ivi-addressbook/demo/main.qml index 2bb4950..9a487ed 100644 --- a/examples/ivicore/qface-ivi-addressbook/demo/main.qml +++ b/examples/ivicore/qface-ivi-addressbook/demo/main.qml @@ -55,7 +55,7 @@ import QtQuick 2.11 import QtQuick.Controls 2.2 import QtQuick.Layouts 1.3 import QtQuick.Window 2.2 -import IviAddressBook 1.0 +import Example.IVI.AddressBook 1.0 Window { id: root diff --git a/examples/ivicore/qface-ivi-climate/demo/demo.pro b/examples/ivicore/qface-ivi-climate/demo/demo.pro index 6bc3bc1..e95e1f0 100644 --- a/examples/ivicore/qface-ivi-climate/demo/demo.pro +++ b/examples/ivicore/qface-ivi-climate/demo/demo.pro @@ -17,7 +17,7 @@ RESOURCES += qml.qrc QMAKE_RPATHDIR += $ORIGIN # Additional import path used to resolve QML modules in Qt Creator's code model -QML_IMPORT_PATH = +QML_IMPORT_PATH += $$OUT_PWD/../frontend/qml # Additional import path used to resolve QML modules just for Qt Quick Designer QML_DESIGNER_IMPORT_PATH = diff --git a/examples/ivicore/qface-ivi-climate/demo/main.cpp b/examples/ivicore/qface-ivi-climate/demo/main.cpp index 6dcce8e..c8bd770 100644 --- a/examples/ivicore/qface-ivi-climate/demo/main.cpp +++ b/examples/ivicore/qface-ivi-climate/demo/main.cpp @@ -61,7 +61,7 @@ int main(int argc, char *argv[]) QGuiApplication app(argc, argv); ClimateModule::registerTypes(); - ClimateModule::registerQmlTypes(QLatin1String("IviClimate"), 1, 0); + ClimateModule::registerQmlTypes(); QQmlApplicationEngine engine; engine.load(QUrl(QStringLiteral("qrc:/main.qml"))); diff --git a/examples/ivicore/qface-ivi-climate/demo/main.qml b/examples/ivicore/qface-ivi-climate/demo/main.qml index 93b28e8..eeb8808 100644 --- a/examples/ivicore/qface-ivi-climate/demo/main.qml +++ b/examples/ivicore/qface-ivi-climate/demo/main.qml @@ -54,7 +54,7 @@ import QtQuick 2.7 import QtQuick.Window 2.2 //! [0] -import IviClimate 1.0 +import Example.IVI.Climate 1.0 Window { diff --git a/examples/ivicore/qface-ivi-remote/demo/demo.pro b/examples/ivicore/qface-ivi-remote/demo/demo.pro index 4380fba..3013949 100644 --- a/examples/ivicore/qface-ivi-remote/demo/demo.pro +++ b/examples/ivicore/qface-ivi-remote/demo/demo.pro @@ -17,7 +17,7 @@ RESOURCES += qml.qrc QMAKE_RPATHDIR += $ORIGIN # Additional import path used to resolve QML modules in Qt Creator's code model -QML_IMPORT_PATH = +QML_IMPORT_PATH = $$OUT_PWD/../frontend/qml # Additional import path used to resolve QML modules just for Qt Quick Designer QML_DESIGNER_IMPORT_PATH = diff --git a/examples/ivicore/qface-ivi-remote/demo/main.cpp b/examples/ivicore/qface-ivi-remote/demo/main.cpp index 907faea..401ddb9 100644 --- a/examples/ivicore/qface-ivi-remote/demo/main.cpp +++ b/examples/ivicore/qface-ivi-remote/demo/main.cpp @@ -61,7 +61,7 @@ int main(int argc, char *argv[]) QGuiApplication app(argc, argv); RemoteModule::registerTypes(); - RemoteModule::registerQmlTypes(QLatin1String("IviRemote"), 1, 0); + RemoteModule::registerQmlTypes(); QQmlApplicationEngine engine; engine.load(QUrl(QStringLiteral("qrc:/main.qml"))); diff --git a/examples/ivicore/qface-ivi-remote/demo/main.qml b/examples/ivicore/qface-ivi-remote/demo/main.qml index 8e421e9..ee95384 100644 --- a/examples/ivicore/qface-ivi-remote/demo/main.qml +++ b/examples/ivicore/qface-ivi-remote/demo/main.qml @@ -55,7 +55,7 @@ import QtQuick 2.7 import QtQuick.Controls 2.3 import QtQuick.Window 2.2 //! [0] -import IviRemote 1.0 +import Example.IVI.Remote 1.0 Window { visible: true |