aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken2
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2019-07-11 11:29:38 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2019-07-29 12:57:31 +0200
commit5f72e0414f024822b5fe072e55f2a15a28332846 (patch)
tree3228aa8e95c68301d00f66c0073c4c529bf503cf /sources/shiboken2
parentc3342a72cfe682f9a9731a8fc12e117282e30d42 (diff)
shiboken: Allow for "auto" as target of type for CONVERTTOCPP in injected code
Task-number: PYSIDE-1037 Change-Id: Idfc70fe571e4058d0c82db1bd0afea54436fe27c Reviewed-by: Christian Tismer <tismer@stackless.com>
Diffstat (limited to 'sources/shiboken2')
-rw-r--r--sources/shiboken2/doc/typesystemvariables.rst2
-rw-r--r--sources/shiboken2/generator/shiboken2/shibokengenerator.cpp2
2 files changed, 3 insertions, 1 deletions
diff --git a/sources/shiboken2/doc/typesystemvariables.rst b/sources/shiboken2/doc/typesystemvariables.rst
index b1b9bbfe6..73d4dd12c 100644
--- a/sources/shiboken2/doc/typesystemvariables.rst
+++ b/sources/shiboken2/doc/typesystemvariables.rst
@@ -150,6 +150,8 @@ Variables
since it otherwise would be indistinguishable from the pointer assignment
above.
+ It is possible to use "auto" as type.
+
.. _converttopython:
**%CONVERTTOPYTHON[CPPTYPE]**
diff --git a/sources/shiboken2/generator/shiboken2/shibokengenerator.cpp b/sources/shiboken2/generator/shiboken2/shibokengenerator.cpp
index e41c91716..34e43a4c7 100644
--- a/sources/shiboken2/generator/shiboken2/shibokengenerator.cpp
+++ b/sources/shiboken2/generator/shiboken2/shibokengenerator.cpp
@@ -2047,7 +2047,7 @@ void ShibokenGenerator::replaceConverterTypeSystemVariable(TypeSystemConverterVa
QString varName = list.at(1).trimmed();
if (!varType.isEmpty()) {
const QString conversionSignature = conversionType->cppSignature();
- if (varType != conversionSignature)
+ if (varType != QLatin1String("auto") && varType != conversionSignature)
qFatal("%s", qPrintable(msgConversionTypesDiffer(varType, conversionSignature)));
c << getFullTypeName(conversionType) << ' ' << varName;
writeMinimalConstructorExpression(c, conversionType);