aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken2/generator
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2019-10-02 14:05:57 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2019-10-04 16:07:59 +0200
commite2774ff5350fa94352858672aa165a8ff22aa3b1 (patch)
treeb3625682cc6b771645996c077a3bb58141fe81a6 /sources/shiboken2/generator
parent63e46f6a0a80cda662be9350923a9e080fac7b6f (diff)
shiboken: Fix handling of modified default expressions
- Do not try to resolve modified default expressions (add enumeration scopes or similar) - Fix the signature parser to handle arbitrary expressions Fixes: PYSIDE-1095 Change-Id: I059c3a1f066687d7c2f0dad9ea7f0d93e292b1b5 Reviewed-by: Christian Tismer <tismer@stackless.com>
Diffstat (limited to 'sources/shiboken2/generator')
-rw-r--r--sources/shiboken2/generator/shiboken2/shibokengenerator.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/sources/shiboken2/generator/shiboken2/shibokengenerator.cpp b/sources/shiboken2/generator/shiboken2/shibokengenerator.cpp
index 34e43a4c7..2a8eefba6 100644
--- a/sources/shiboken2/generator/shiboken2/shibokengenerator.cpp
+++ b/sources/shiboken2/generator/shiboken2/shibokengenerator.cpp
@@ -573,11 +573,11 @@ QString ShibokenGenerator::guessScopeForDefaultValue(const AbstractMetaFunction
{
QString value = getDefaultValue(func, arg);
- if (value.isEmpty())
- return QString();
-
- if (isPointer(arg->type()))
+ if (value.isEmpty()
+ || arg->hasModifiedDefaultValueExpression()
+ || isPointer(arg->type())) {
return value;
+ }
static const QRegularExpression enumValueRegEx(QStringLiteral("^([A-Za-z_]\\w*)?$"));
Q_ASSERT(enumValueRegEx.isValid());