summaryrefslogtreecommitdiffstats
path: root/src/corelib/doc/src/resource-system.qdoc
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@digia.com>2013-11-05 14:07:43 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-11-06 14:21:56 +0100
commit8f77f9536fc31fe9e4ac032845ff168c7ca41ff5 (patch)
tree8bea00433ba6fc74492dfd5b5e44aafd273a9fb8 /src/corelib/doc/src/resource-system.qdoc
parent762c3d87de67ec8e8df8b810065ca5fe86db87a9 (diff)
Clarify Q_INIT_RESOURCE in relation to namespaces
The constructor functions generated by rcc are put in the global namespace. As there is no way to forward-declare a function in the global namespace from within another namespace, Q_INIT_RESOURCE must always be called from the global namespace. Change-Id: I8b8b9451271cf2f9147164696a6df7615678ab03 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Diffstat (limited to 'src/corelib/doc/src/resource-system.qdoc')
-rw-r--r--src/corelib/doc/src/resource-system.qdoc4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/corelib/doc/src/resource-system.qdoc b/src/corelib/doc/src/resource-system.qdoc
index 4c24320851..91ce8afcf8 100644
--- a/src/corelib/doc/src/resource-system.qdoc
+++ b/src/corelib/doc/src/resource-system.qdoc
@@ -198,6 +198,10 @@
clients of your library will only link in the resources if they use
the feature of the library that depends on them.
+ Note: As the resource initializers generated by rcc are declared in the
+ global namespace, your calls to \l Q_INIT_RESOURCE() also need to be done
+ outside of any namespace.
+
If the library includes resources that are not used internally, but
instead exposed to clients of the library, the initialization needs
to happen in the application code. For example: