aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken2/generator/shiboken2
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2017-06-30 13:37:51 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2017-08-03 06:21:06 +0000
commit8c699313c85419dc73db35dbdefc844d88a039c6 (patch)
tree53e035e8ae21a7a02657e3a3f6ef30e2b97959e7 /sources/shiboken2/generator/shiboken2
parent700ebd831f9ee7143c525bb936cd55f2a91adcc7 (diff)
Shiboken: No longer change arrays[] to pointer types
In AbstractMetaBuilder, no longer change array types like "int[]" to "int*". Task-number: PYSIDE-354 Task-number: PYSIDE-516 Change-Id: Ia9e15ae3fca895bf179275eb31a94323d91f4941 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'sources/shiboken2/generator/shiboken2')
-rw-r--r--sources/shiboken2/generator/shiboken2/shibokengenerator.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/sources/shiboken2/generator/shiboken2/shibokengenerator.cpp b/sources/shiboken2/generator/shiboken2/shibokengenerator.cpp
index 2693ecf40..8ec4474ad 100644
--- a/sources/shiboken2/generator/shiboken2/shibokengenerator.cpp
+++ b/sources/shiboken2/generator/shiboken2/shibokengenerator.cpp
@@ -1330,8 +1330,12 @@ QString ShibokenGenerator::argumentString(const AbstractMetaFunction *func,
arg = modified_type.replace(QLatin1Char('$'), QLatin1Char('.'));
if (!(options & Generator::SkipName)) {
- arg += QLatin1Char(' ');
- arg += argument->name();
+ // "int a", "int a[]"
+ const int arrayPos = arg.indexOf(QLatin1Char('['));
+ if (arrayPos != -1)
+ arg.insert(arrayPos, QLatin1Char(' ') + argument->name());
+ else
+ arg.append(QLatin1Char(' ') + argument->name());
}
if ((options & Generator::SkipDefaultValues) != Generator::SkipDefaultValues &&