diff options
author | Amir Masoud Abdol <amir.abdol@qt.io> | 2023-02-07 14:51:35 +0100 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2023-02-08 11:59:24 +0000 |
commit | 1732858bada21b1e04340a965761d26464553838 (patch) | |
tree | b1f9bef80caf8414f06e3c212b9a7706bfac98e1 | |
parent | b097fb6dc6cb13891ab7117c97e6fd6c203d1649 (diff) | |
download | qtdoc-1732858bada21b1e04340a965761d26464553838.tar.gz |
Remove AUTO_RESOURCE_PREFIX and refer to Qt CMake policies instead
Task-number: QTBUG-96233
Change-Id: Idf257db902420122eae7536057d6cc6e7e24b191
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit 00e010339e9771a0c8c24ec8fa03a0018fe108a3)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r-- | doc/src/qmlapp/deployment.qdoc | 19 | ||||
-rw-r--r-- | doc/src/whatsnew/whatsnew65.qdoc | 11 |
2 files changed, 19 insertions, 11 deletions
diff --git a/doc/src/qmlapp/deployment.qdoc b/doc/src/qmlapp/deployment.qdoc index 33b505a6..4da2bcf6 100644 --- a/doc/src/qmlapp/deployment.qdoc +++ b/doc/src/qmlapp/deployment.qdoc @@ -173,22 +173,27 @@ resources. re-compiled whenever a QML source file is changed, to update the resources in the package. The \l{qt_add_qml_module}{CMake QML Module API} automatically places your QML files in the resource -system. To access them, load your main QML file as a resource using the \c{:/} prefix or as a URL -with the \c{qrc} scheme. The path in the resource system where your QML files are placed can be -found by concatenating: +system. To access them, load your main QML file as a resource or as a URL with the \c{qrc} scheme. +The path in the resource system where your QML files are placed can be found by concatenating: \list -\li the \c RESOURCE_PREFIX you have passed to \l{qt_add_qml_module}, or \c{/qt/qml} if you have - passed \c AUTO_RESOURCE_PREFIX, or just \c{/} if you haven't passed either. +\li the \c RESOURCE_PREFIX you have passed to \l{qt_add_qml_module}. +\li \c{/qt/qml}, if you have \e{not} passed \c RESOURCE_PREFIX to + \l{qt_add_qml_module} and \l{QTP0001} policy is set to \c NEW. +\li \c{/}, if you have \e{not} passed \c RESOURCE_PREFIX to \l{qt_add_qml_module} + and \l{QTP0001} policy is \c{not} set to \c NEW. \li If you have \e{not} passed \c NO_RESOURCE_TARGET_PATH to \l{qt_add_qml_module}: the \c URI you have passed to \l{qt_add_qml_module} with dots replaced by slashes. \endlist For example, a module called \c{My.Own.Module} is placed at: \list -\li \c{:/qt/qml/My/Own/Module/} in case of \c AUTO_RESOURCE_PREFIX +\li \c{:/qt/qml/My/Own/Module/} if you have specified \c{/qt/qml} as \c RESOURCE_PREFIX, or + you have \e{not} passed \c RESOURCE_PREFIX and \l{QTP0001} policy is set to \c NEW. +\li \c{:/My/Own/Module/} if you have specified \c{/} as \c RESOURCE_PREFIX, or + you have \e{not} passed \c RESOURCE_PREFIX and \l{QTP0001} policy is \e{not} set to \c NEW. +} \li \c{:/Some/Prefix/My/Own/Module/} if you have specified \c{Some/Prefix/} as \c RESOURCE_PREFIX -\li \c{:/My/Own/Module/} in case of no resource prefix or \c{/} as \c RESOURCE_PREFIX \li \c{:/} if you have specified \c NO_RESOURCE_TARGET_PATH \endlist diff --git a/doc/src/whatsnew/whatsnew65.qdoc b/doc/src/whatsnew/whatsnew65.qdoc index b9633ed1..cb92b0ec 100644 --- a/doc/src/whatsnew/whatsnew65.qdoc +++ b/doc/src/whatsnew/whatsnew65.qdoc @@ -192,10 +192,6 @@ gaining support for methods like map(), reduce() and forEach(). The same holds for other sequence types, like QList<int> and similar. - \li Added a new \l {AUTO_RESOURCE_PREFIX} attribute to - \l {qt_add_qml_module} to automate the setting of resource prefixes. - If you use it, the QML engine will always be able to find your - QML modules in the resource file system. \li Extended the \l {QML Type Compiler}{qmltc} to support more qml constructs, notably translation bindings, inline components, singletons, and signal handlers for C++-defined @@ -213,6 +209,13 @@ \endlist \li \l {The QML Disk Cache} can be controlled in a more fine-grained way using the new environment variable \l {QML_DISK_CACHE}. + \li Added new public CMake API: + \list + \li Introduced a \l{Qt CMake policy} to set a better default for the + resource prefix. If \l{QTP0001} policy is set to \c NEW, the QML + engine will always be able to find your QML modules in the + resource file system. + \endlist \endlist \section2 Qt Quick 3D Module |