diff --git a/tools/dumpcpp/main.cpp b/tools/dumpcpp/main.cpp
index 4ec7697f4b33ddbc840065579e17b7a8c805be2a..691e723f54c5562bc659d33117f4bc02ccfc832b 100644
--- a/tools/dumpcpp/main.cpp
+++ b/tools/dumpcpp/main.cpp
@@ -432,9 +432,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 + "()";