summaryrefslogtreecommitdiffstats
path: root/src/corelib/io
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@digia.com>2013-11-04 10:48:49 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-11-05 15:40:14 +0100
commitaa6a0cdbf584eacdbf81b28cca97cc40200f6b6b (patch)
tree5b934cd6c5101992180ad0a7b9a0b832ee4aa4ca /src/corelib/io
parent6802f34bedca25e05d1eda962b268b1936dd4d62 (diff)
Clarify use of Q_INIT_RESOURCE
The Q_INIT_RESOURCE macro is needed if a library itself uses resources, in which case the Q_INIT_RESOURCE can and should happen in the library (like we do for eg. widget styles), or if a library exposes resources that are supposed to be used by the library clients, in which case the macro needs to be put in the application code. The distinction between the two, and the fact that resources built as part of the main executable do not need the explicit initialization, were not all that clear. This was evident by the lack of Q_INIT_RESOURCE in our own Qt libraries, and the various Q_INIT_RESOURCE calls in our examples where they are not needed. Change-Id: I40258458e9fdf9ee5502c212971fb3d90b4fc388 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/corelib/io')
-rw-r--r--src/corelib/io/qdir.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/corelib/io/qdir.cpp b/src/corelib/io/qdir.cpp
index 148ae5b202..0c65817557 100644
--- a/src/corelib/io/qdir.cpp
+++ b/src/corelib/io/qdir.cpp
@@ -2205,10 +2205,10 @@ QStringList QDir::nameFiltersFromString(const QString &nameFilter)
\relates QDir
Initializes the resources specified by the \c .qrc file with the
- specified base \a name. Normally, Qt resources are loaded
- automatically at startup. The Q_INIT_RESOURCE() macro is
- necessary on some platforms for resources stored in a static
- library.
+ specified base \a name. Normally, when resources are built as part
+ of the application, the resources are loaded automatically at
+ startup. The Q_INIT_RESOURCE() macro is necessary on some platforms
+ for resources stored in a static library.
For example, if your application's resources are listed in a file
called \c myapp.qrc, you can ensure that the resources are