summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2022-02-03 18:35:10 +0100
committerAlexandru Croitor <alexandru.croitor@qt.io>2022-02-08 12:32:43 +0100
commit4a8687ba18baca83b5bc7474384419e24c99d4b1 (patch)
tree76ded5aeaba79a5808cf61ff14c3bee292ea585c
parent000e26a4d5ab66b532146e66333e1c72859bdc52 (diff)
Fix alarms demo to run successfully
Previously it failed with QQmlApplicationEngine failed to load component qrc:/alarms/main.qml: No such file or directory main.cpp was adjusted to use alarms/main.cpp but the resource file locations were not changed. Change them to match the expected path in main.cpp. qtquickcontrols2.conf needs to stay in the root of the resource path, so it's added via a separate resource. Amends 302121874ea6e664ea2a59a07bff8fa06983c335 Fixes: QTBUG-100434 Change-Id: I3436e07600ca7dad8bba45274ba49dc6c137a938 Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Topi Reiniƶ <topi.reinio@qt.io> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> (cherry picked from commit c43d133e5233415260afbed78f7cda8b4dec680c)
-rw-r--r--examples/tutorials/alarms/alarms.pro2
-rw-r--r--examples/tutorials/alarms/controls_conf.qrc5
-rw-r--r--examples/tutorials/alarms/qml.qrc3
3 files changed, 7 insertions, 3 deletions
diff --git a/examples/tutorials/alarms/alarms.pro b/examples/tutorials/alarms/alarms.pro
index 14fc29a86..4e75fa526 100644
--- a/examples/tutorials/alarms/alarms.pro
+++ b/examples/tutorials/alarms/alarms.pro
@@ -4,7 +4,7 @@ QT += quick
SOURCES += main.cpp
-RESOURCES += qml.qrc
+RESOURCES += qml.qrc controls_conf.qrc
target.path = $$[QT_INSTALL_EXAMPLES]/demos/alarms
INSTALLS += target
diff --git a/examples/tutorials/alarms/controls_conf.qrc b/examples/tutorials/alarms/controls_conf.qrc
new file mode 100644
index 000000000..4fbf17b7b
--- /dev/null
+++ b/examples/tutorials/alarms/controls_conf.qrc
@@ -0,0 +1,5 @@
+<RCC>
+ <qresource prefix="/">
+ <file>qtquickcontrols2.conf</file>
+ </qresource>
+</RCC>
diff --git a/examples/tutorials/alarms/qml.qrc b/examples/tutorials/alarms/qml.qrc
index ae9ac9078..270febb21 100644
--- a/examples/tutorials/alarms/qml.qrc
+++ b/examples/tutorials/alarms/qml.qrc
@@ -1,7 +1,6 @@
<RCC>
- <qresource prefix="/">
+ <qresource prefix="/alarms/">
<file>main.qml</file>
- <file>qtquickcontrols2.conf</file>
<file>TumblerDelegate.qml</file>
<file>AlarmModel.qml</file>
<file>AlarmDelegate.qml</file>