aboutsummaryrefslogtreecommitdiffstats
path: root/examples/quickcontrols/chattutorial/chapter3
diff options
context:
space:
mode:
authorFabian Kosmale <[email protected]>2022-12-08 18:28:40 +0100
committerAmir Masoud Abdol <[email protected]>2023-02-01 23:39:19 +0100
commitec452fc6e87e82d135d7ef782d5c811583d5c433 (patch)
treed23a91de87691375298ee23435fc4bd1f21a3475 /examples/quickcontrols/chattutorial/chapter3
parenta6d9312c99d6f80cbea7538276d2890d0cc4c760 (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 <[email protected]> Reviewed-by: Leena Miettinen <[email protected]>
Diffstat (limited to 'examples/quickcontrols/chattutorial/chapter3')
-rw-r--r--examples/quickcontrols/chattutorial/chapter3/CMakeLists.txt2
-rw-r--r--examples/quickcontrols/chattutorial/chapter3/chapter3.pro2
-rw-r--r--examples/quickcontrols/chattutorial/chapter3/main.cpp2
3 files changed, 3 insertions, 3 deletions
diff --git a/examples/quickcontrols/chattutorial/chapter3/CMakeLists.txt b/examples/quickcontrols/chattutorial/chapter3/CMakeLists.txt
index e55597f2c8..92ac5683fd 100644
--- a/examples/quickcontrols/chattutorial/chapter3/CMakeLists.txt
+++ b/examples/quickcontrols/chattutorial/chapter3/CMakeLists.txt
@@ -25,7 +25,7 @@ target_link_libraries(chattutorial-chapter3 PRIVATE
Qt::Quick
)
-# Resources:
+qt_policy(SET QTP0001 NEW)
qt_add_qml_module(chattutorial-chapter3
URI chapter3
QML_FILES
diff --git a/examples/quickcontrols/chattutorial/chapter3/chapter3.pro b/examples/quickcontrols/chattutorial/chapter3/chapter3.pro
index 9a4c5b5703..5314e2dd36 100644
--- a/examples/quickcontrols/chattutorial/chapter3/chapter3.pro
+++ b/examples/quickcontrols/chattutorial/chapter3/chapter3.pro
@@ -21,7 +21,7 @@ resources.files = \
main.qml
-resources.prefix = chapter3/
+resources.prefix = qt/qml/chapter3/
RESOURCES += resources \
qtquickcontrols2.conf
diff --git a/examples/quickcontrols/chattutorial/chapter3/main.cpp b/examples/quickcontrols/chattutorial/chapter3/main.cpp
index 4347d3ff6c..71e250bed5 100644
--- a/examples/quickcontrols/chattutorial/chapter3/main.cpp
+++ b/examples/quickcontrols/chattutorial/chapter3/main.cpp
@@ -9,7 +9,7 @@ int main(int argc, char *argv[])
QGuiApplication app(argc, argv);
QQmlApplicationEngine engine;
- engine.load(QUrl(QStringLiteral("qrc:/chapter3/main.qml")));
+ engine.load(QUrl(QStringLiteral("qrc:/qt/qml/chapter3/main.qml")));
return app.exec();
}