summaryrefslogtreecommitdiffstats
path: root/src/tools/rcc
diff options
context:
space:
mode:
authorhjk <hjk121@nokiamail.com>2014-10-24 10:53:01 +0200
committerhjk <hjk121@nokiamail.com>2014-10-25 11:48:43 +0200
commite859de3fb5203579fbb4a6774bcdf59dc00404f9 (patch)
treecc67c1d590990800d0d4db915c65a77997d274a4 /src/tools/rcc
parent3f9dbc0ec82e1c7c823707668fcd326d8a1dd82b (diff)
Add extra declarations to make rcc output pass -Wmissing-declarations
The previously produced code was valid C++. Add the declaration nevertheless to help people who want to use the switch in their own code. Task-number: QTBUG-42119 Change-Id: Ia47cf3930684474ff65e5cf37335d7d7f57a1d31 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Diffstat (limited to 'src/tools/rcc')
-rw-r--r--src/tools/rcc/rcc.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/tools/rcc/rcc.cpp b/src/tools/rcc/rcc.cpp
index 11a99d136d..9d8a7b7051 100644
--- a/src/tools/rcc/rcc.cpp
+++ b/src/tools/rcc/rcc.cpp
@@ -1057,6 +1057,12 @@ bool RCCResourceLibrary::writeInitializer()
QByteArray initResources = "qInitResources";
initResources += initName;
+
+ // Work around -Wmissing-declarations warnings.
+ writeString("int ");
+ writeMangleNamespaceFunction(initResources);
+ writeString("();\n");
+
writeString("int ");
writeMangleNamespaceFunction(initResources);
writeString("()\n{\n");
@@ -1073,6 +1079,12 @@ bool RCCResourceLibrary::writeInitializer()
//cleanup
QByteArray cleanResources = "qCleanupResources";
cleanResources += initName;
+
+ // Work around -Wmissing-declarations warnings.
+ writeString("int ");
+ writeMangleNamespaceFunction(cleanResources);
+ writeString("();\n");
+
writeString("int ");
writeMangleNamespaceFunction(cleanResources);
writeString("()\n{\n");