diff options
| author | Fabian Kosmale <fabian.kosmale@qt.io> | 2022-12-08 18:28:40 +0100 |
|---|---|---|
| committer | Amir Masoud Abdol <amir.abdol@qt.io> | 2023-02-01 23:39:19 +0100 |
| commit | ec452fc6e87e82d135d7ef782d5c811583d5c433 (patch) | |
| tree | d23a91de87691375298ee23435fc4bd1f21a3475 /examples/quickcontrols/chattutorial/chapter4 | |
| parent | a6d9312c99d6f80cbea7538276d2890d0cc4c760 (diff) | |
qt_add_qml_module: Make usage of AUTO_RESOURCE_PREFIX a policy
Writing AUTO_RESOURCE_PREFIX in every qt_add_qml_module call seems
rather pointless.
In addition:
- Add documentation for QTP0001.
- Adjust some of the examples to use QTP0001 policy.
- Improved the error message.
Pick-to: 6.5
Task-number: QTBUG-96233
Change-Id: I6e19a491acba97493893bf1953fca3462296c1ea
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Diffstat (limited to 'examples/quickcontrols/chattutorial/chapter4')
3 files changed, 3 insertions, 3 deletions
diff --git a/examples/quickcontrols/chattutorial/chapter4/CMakeLists.txt b/examples/quickcontrols/chattutorial/chapter4/CMakeLists.txt index c26fe1416b..cc56b319e7 100644 --- a/examples/quickcontrols/chattutorial/chapter4/CMakeLists.txt +++ b/examples/quickcontrols/chattutorial/chapter4/CMakeLists.txt @@ -28,7 +28,7 @@ target_link_libraries(chattutorial-chapter4 PRIVATE Qt::Sql ) -# Resources: +qt_policy(SET QTP0001 NEW) qt_add_qml_module(chattutorial-chapter4 URI chapter4 QML_FILES diff --git a/examples/quickcontrols/chattutorial/chapter4/chapter4.pro b/examples/quickcontrols/chattutorial/chapter4/chapter4.pro index baf2d319d5..399b3506c2 100644 --- a/examples/quickcontrols/chattutorial/chapter4/chapter4.pro +++ b/examples/quickcontrols/chattutorial/chapter4/chapter4.pro @@ -26,7 +26,7 @@ resources.files = \ images/Hans_Gude@3x.png \ images/Hans_Gude@4x.png \ main.qml -resources.prefix = chapter4/ +resources.prefix = qt/qml/chapter4/ RESOURCES += resources \ qtquickcontrols2.conf diff --git a/examples/quickcontrols/chattutorial/chapter4/main.cpp b/examples/quickcontrols/chattutorial/chapter4/main.cpp index 0ca281c7d9..4c7289deb3 100644 --- a/examples/quickcontrols/chattutorial/chapter4/main.cpp +++ b/examples/quickcontrols/chattutorial/chapter4/main.cpp @@ -43,7 +43,7 @@ int main(int argc, char *argv[]) connectToDatabase(); QQmlApplicationEngine engine; - engine.load(QUrl(QStringLiteral("qrc:/chapter4/main.qml"))); + engine.load(QUrl(QStringLiteral("qrc:/qt/qml/chapter4/main.qml"))); if (engine.rootObjects().isEmpty()) return -1; |
