qtdeclarative/examples/quickcontrols
Alexandru Croitor 32f6cbe9f0 Fix filesystemexplorer example to work in macOS bundles
The FileSystemModule qmldir was explicitly put into the "/" resource
prefix, but that prefix is not a default qml import path. That caused
the qml module not to be found when building on macOS as an app
bundle, which relies only on resources and not the file system to find
the module.

To ensure the module qmldir is found in the resources, we want it to
be placed in the default qml import path ':/qt/qml'. To do that,
remove the previously specified RESOURCE_PREFIX option and enable
the QTP0001 policy by requiring Qt 6.5+, which will put the module
qmldir into :/qt/qml/FileSystemModule/qmldir.

Because the policy also changes the resource prefix for other
resources (images), adjust all Image source urls to be relative paths
(relative to the component), instead of absolute paths.

Also adjust the qmake generated qrc file to place the files into the
new resource prefix.

Amends 213e932e13

Fixes: QTBUG-112683
Change-Id: I5205cf6d399a6faaf7cce68d55c71dade37479a7
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Dennis Oberst <dennis.oberst@qt.io>
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Reviewed-by: Amir Masoud Abdol <amir.abdol@qt.io>
2023-04-12 09:36:57 +02:00
..
attachedstyleproperties Replace AUTO_RESOURCE_PREFIX with Qt CMake Policy in examples, tests 2023-02-21 19:45:44 +01:00
chattutorial Doc: Fix documentation warnings 2023-03-20 21:40:00 +00:00
contactlist CMake: Allow omitting the version of QML modules 2023-01-27 19:16:39 +01:00
eventcalendar CMake: Allow omitting the version of QML modules 2023-01-27 19:16:39 +01:00
filesystemexplorer Fix filesystemexplorer example to work in macOS bundles 2023-04-12 09:36:57 +02:00
flatstyle CMake: Allow omitting the version of QML modules 2023-01-27 19:16:39 +01:00
gallery Gallery/Text editor: Update example logos 2023-03-27 08:22:16 +01:00
imagine CMake: Allow omitting the version of QML modules 2023-01-27 19:16:39 +01:00
ios/todolist Adapt to Qt::Appearance to Qt::ColorScheme rename 2023-02-13 12:52:54 +01:00
texteditor Gallery/Text editor: Update example logos 2023-03-27 08:22:16 +01:00
wearable Doc: remove "2" from Qt Quick Controls files 2022-12-01 10:26:28 +08:00
CMakeLists.txt Remove side-panel and swipe-to-remove quickcontrol examples 2023-03-03 07:37:00 +00:00
quickcontrols.pro File System Explorer example: Add to qmake targets 2023-03-16 14:03:21 +00:00