diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2017-06-30 13:37:51 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2017-08-03 06:21:06 +0000 |
commit | 8c699313c85419dc73db35dbdefc844d88a039c6 (patch) | |
tree | 53e035e8ae21a7a02657e3a3f6ef30e2b97959e7 /sources/shiboken2/generator/shiboken2 | |
parent | 700ebd831f9ee7143c525bb936cd55f2a91adcc7 (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.cpp | 8 |
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 && |