summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@theqtcompany.com>2015-06-03 10:58:07 +0200
committerLiang Qi <liang.qi@theqtcompany.com>2015-06-03 10:58:07 +0200
commit4eac3d1d93ee1112a3b6d5baff941986c25ac56f (patch)
tree21b6cd88bc9a9704b2a943a06be3204a6167aaaf /tools
parent2ca0f0b505fa4cebf9aa99c8cf2eb84b0818ff97 (diff)
parentbd5533b250ae4fb6a144fda69ead425740c61017 (diff)
downloadqtactiveqt-4eac3d1d93ee1112a3b6d5baff941986c25ac56f.tar.gz
Merge remote-tracking branch 'origin/5.5' into dev
Change-Id: I37609a137247e3203d09942e187ec880c6eba884
Diffstat (limited to 'tools')
-rw-r--r--tools/dumpcpp/main.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/tools/dumpcpp/main.cpp b/tools/dumpcpp/main.cpp
index 1b325b5..673b681 100644
--- a/tools/dumpcpp/main.cpp
+++ b/tools/dumpcpp/main.cpp
@@ -431,9 +431,16 @@ void generateClassDecl(QTextStream &out, const QString &controlID, const QMetaOb
if (!parameterType.contains("::") && namespaceForType.contains(parameterType))
parameterType.prepend(namespaceForType.value(parameterType) + "::");
+ QByteArray arraySpec; // transform array method signature "foo(int[4])" ->"foo(int p[4])"
+ const int arrayPos = parameterType.lastIndexOf('[');
+ if (arrayPos != -1) {
+ arraySpec = parameterType.right(parameterType.size() - arrayPos);
+ parameterType.truncate(arrayPos);
+ }
slotNamedSignature += constRefify(parameterType);
slotNamedSignature += ' ';
slotNamedSignature += parameterSplit.at(i);
+ slotNamedSignature += arraySpec;
if (defaultArguments >= signatureSplit.count() - i) {
slotNamedSignature += " = ";
slotNamedSignature += parameterType + "()";