Fix policy warnings in project templates

When compiling default created projects with Qt 6.5 and cmake
warnings about Qt policy QTP0001 where issued. This is now
fixed for the project templates. A second patch for the
qtquick-components repo will be provided to get rid of the
remaining policy warnings

Change-Id: Ia701a0cc7e030c9cb1459dc48e5ed2a91a6c6c0e
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
This commit is contained in:
Knud Dollereder
2023-06-15 15:21:26 +02:00
parent c0ef0895b3
commit 9021558bcc
10 changed files with 17 additions and 10 deletions

View File

@@ -13,7 +13,7 @@ int main(int argc, char *argv[])
QGuiApplication app(argc, argv);
QQmlApplicationEngine engine;
const QUrl url(u"qrc:Main/main.qml"_qs);
const QUrl url(u"qrc:/qt/qml/Main/main.qml"_qs);
QObject::connect(
&engine, &QQmlApplicationEngine::objectCreated, &app,
[url](QObject *obj, const QUrl &objUrl) {

View File

@@ -7,5 +7,6 @@ qt_add_library(%2 STATIC)
qt6_add_qml_module(%2
URI "%3"
VERSION 1.0
RESOURCE_PREFIX "/qt/qml"
%4
)

View File

@@ -4,6 +4,7 @@
qt6_add_qml_module(%1
URI "Main"
VERSION 1.0
RESOURCE_PREFIX "/qt/qml"
NO_PLUGIN
QML_FILES main.qml
)