summaryrefslogtreecommitdiffstats
path: root/examples/multimedia/video/recorder
diff options
context:
space:
mode:
authorSamuel Mira <samuel.mira@qt.io>2022-03-07 18:50:08 +0200
committerSamuel Mira <samuel.mira@qt.io>2022-03-09 16:47:59 +0200
commitbdacf2b290e9d341ffc5d96e7bcc696ef3b7add7 (patch)
treec43cf588ce91070576007ed3c7ee7eb1135d746c /examples/multimedia/video/recorder
parent35fefad005015f2c0147e4d0f34d30754417dc5c (diff)
Fix missing main.qml in examples
These examples use resources files with qml files inside but the resource files were added in the project sources. That prevented the app to find and use the resource files. To fix the issue the resources were added using qt6_add_resources macro. Note that adding the cmake flag set(CMAKE_AUTORCC ON) would also work, but the qt6_add_resources macro is more consistent with the rest of the examples. Fixes: QTBUG-101518 Pick-to: 6.3 Change-Id: I5fb2481d5576683171a2292bdc35e417ee6d8fab Reviewed-by: Piotr Srebrny <piotr.srebrny@qt.io> Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Diffstat (limited to 'examples/multimedia/video/recorder')
-rw-r--r--examples/multimedia/video/recorder/CMakeLists.txt25
-rw-r--r--examples/multimedia/video/recorder/qml.qrc18
2 files changed, 24 insertions, 19 deletions
diff --git a/examples/multimedia/video/recorder/CMakeLists.txt b/examples/multimedia/video/recorder/CMakeLists.txt
index ab43bbb44..63036e7b2 100644
--- a/examples/multimedia/video/recorder/CMakeLists.txt
+++ b/examples/multimedia/video/recorder/CMakeLists.txt
@@ -18,13 +18,36 @@ find_package(Qt6 REQUIRED COMPONENTS Core Multimedia Quick)
set(PROJECT_SOURCES
main.cpp
- qml.qrc
)
qt_add_executable(recorder
${PROJECT_SOURCES}
)
+set(resource_files
+ "main.qml"
+ "qmldir"
+ "MediaList.qml"
+ "AudioInputSelect.qml"
+ "CameraSelect.qml"
+ "RecordButton.qml"
+ "Controls.qml"
+ "StyleParameter.qml"
+ "StyleRectangle.qml"
+ "SettingsMetaData.qml"
+ "SettingsEncoder.qml"
+ "StyleSlider.qml"
+ "Style.qml"
+ "Playback.qml"
+)
+
+qt6_add_resources(recorder "recorder"
+ PREFIX
+ "/"
+ FILES
+ ${resource_files}
+)
+
target_compile_definitions(recorder
PRIVATE $<$<OR:$<CONFIG:Debug>,$<CONFIG:RelWithDebInfo>>:QT_QML_DEBUG>)
target_link_libraries(recorder
diff --git a/examples/multimedia/video/recorder/qml.qrc b/examples/multimedia/video/recorder/qml.qrc
deleted file mode 100644
index a81fc822a..000000000
--- a/examples/multimedia/video/recorder/qml.qrc
+++ /dev/null
@@ -1,18 +0,0 @@
-<RCC>
- <qresource prefix="/">
- <file>main.qml</file>
- <file>MediaList.qml</file>
- <file>AudioInputSelect.qml</file>
- <file>CameraSelect.qml</file>
- <file>RecordButton.qml</file>
- <file>Controls.qml</file>
- <file>StyleParameter.qml</file>
- <file>StyleRectangle.qml</file>
- <file>SettingsMetaData.qml</file>
- <file>SettingsEncoder.qml</file>
- <file>StyleSlider.qml</file>
- <file>Style.qml</file>
- <file>qmldir</file>
- <file>Playback.qml</file>
- </qresource>
-</RCC>