summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@qt.io>2020-06-16 11:54:14 +0200
committerJoerg Bornemann <joerg.bornemann@qt.io>2020-06-16 17:56:09 +0200
commite817ac3d68295fc0670ccede4df08bf1c7e627d2 (patch)
treea8ef35868080f64987913d3beb63d37dab5b57a2 /src
parent3110cbad6f697307ecaafa137d1d3e2be35dda60 (diff)
Document that Q_INIT_RESOURCE is not necessary for CMake-based projects
Since commit e343affd634 we're creating object libraries for Qt resources in static libraries when building Qt or a Qt-based project with CMake. The purpose of this is to remove the need for calling Q_INIT_RESOURCE in static libraries. Add a note to the documentation and a changelog entry. [ChangeLog][CMake] Calling Q_INIT_RESOURCE in static libraries is not strictly necessary anymore for CMake-based projects. There, for each resource, an object library is created which is linked into consuming projects. This ensures that the linker does not discard the resource's object file, and its initializer is called automatically. Change-Id: I70de439f964dc7257a2255683eda4d434fa451d0 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/corelib/doc/src/resource-system.qdoc8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/corelib/doc/src/resource-system.qdoc b/src/corelib/doc/src/resource-system.qdoc
index 2ce38addc0..9b80c31b00 100644
--- a/src/corelib/doc/src/resource-system.qdoc
+++ b/src/corelib/doc/src/resource-system.qdoc
@@ -293,6 +293,10 @@
any longer), you can force removal of your resources by calling
\l Q_CLEANUP_RESOURCE() with the same base name as above.
- Note: The use of \l Q_INIT_RESOURCE() and \l Q_CLEANUP_RESOURCE() is
- not necessary when the resource is built as part of the application.
+ \note The use of \l Q_INIT_RESOURCE() and \l Q_CLEANUP_RESOURCE() is
+ not necessary in the following cases:
+ \list
+ \li When the resource is built as part of the application.
+ \li When the resource is built with CMake as part of a static library.
+ \endlist
*/