diff options
12 files changed, 14 insertions, 14 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 diff --git a/src/ivicore/doc/src/examples-qface-ivi-climate.qdoc b/src/ivicore/doc/src/examples-qface-ivi-climate.qdoc index b29a320..4cff1bc 100644 --- a/src/ivicore/doc/src/examples-qface-ivi-climate.qdoc +++ b/src/ivicore/doc/src/examples-qface-ivi-climate.qdoc @@ -250,8 +250,8 @@ and call the \e {ClimateModule::registerTypes} and \e {ClimateModule::registerQm that are generated in the module singleton to register all autogenerated interfaces and types with the QML engine. -In our QML application, we still need to import the module using the name we provided to \e -{ClimateModule::registerQmlTypes}. Afterwards the interface can be instantiated like any other +In our QML application, we still need to import the module using the same module uri which is used +in the qface file. Afterwards the interface can be instantiated like any other QML item. \snippet ../../../../examples/ivicore/qface-ivi-climate/demo/main.qml 0 diff --git a/src/ivicore/doc/src/examples-qface-ivi-remote.qdoc b/src/ivicore/doc/src/examples-qface-ivi-remote.qdoc index db749c0..6694f20 100644 --- a/src/ivicore/doc/src/examples-qface-ivi-remote.qdoc +++ b/src/ivicore/doc/src/examples-qface-ivi-remote.qdoc @@ -186,8 +186,8 @@ and call the \e {RemoteModule::registerTypes} and \e {RemoteModule::registerQmlT that are generated in the module singleton to register all autogenerated interfaces and types with the QML engine. -In our QML application, we still need to import the module using the name we provided to \e -{RemoteModule::registerQmlTypes}. Afterwards the interface can be instantiated like any other +In our QML application, we still need to import the module using the same module uri which is used +in the qface file. Afterwards the interface can be instantiated like any other QML item. \code diff --git a/src/tools/ivigenerator/templates_frontend/module.h.tpl b/src/tools/ivigenerator/templates_frontend/module.h.tpl index 3c1393c..706d68f 100644 --- a/src/tools/ivigenerator/templates_frontend/module.h.tpl +++ b/src/tools/ivigenerator/templates_frontend/module.h.tpl @@ -77,7 +77,7 @@ public: {% endfor %} static void registerTypes(); - static void registerQmlTypes(const QString& uri, int majorVersion = 1, int minorVersion = 0); + static void registerQmlTypes(const QString& uri = QStringLiteral("{{module|qml_type}}"), int majorVersion = 1, int minorVersion = 0); }; {% for enum in module.enums %} |