aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken6/ApiExtractor/abstractmetabuilder_helpers.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'sources/shiboken6/ApiExtractor/abstractmetabuilder_helpers.cpp')
-rw-r--r--sources/shiboken6/ApiExtractor/abstractmetabuilder_helpers.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/sources/shiboken6/ApiExtractor/abstractmetabuilder_helpers.cpp b/sources/shiboken6/ApiExtractor/abstractmetabuilder_helpers.cpp
index 07cedd09e..68eef737a 100644
--- a/sources/shiboken6/ApiExtractor/abstractmetabuilder_helpers.cpp
+++ b/sources/shiboken6/ApiExtractor/abstractmetabuilder_helpers.cpp
@@ -85,12 +85,17 @@ static bool isFloatConstant(const QStringView expr)
// to the default value, making it usable from Python wrapper code outside the
// owner class hierarchy. See TestEnum::testEnumDefaultValues().
QString AbstractMetaBuilderPrivate::fixEnumDefault(const AbstractMetaType &type,
- const QString &expr) const
+ const QString &expr,
+ const AbstractMetaClassCPtr &klass) const
{
// QFlags construct from integers, do not fix that
if (isIntegerConstant(expr))
return expr;
+ const QString field = qualifyStaticField(klass, expr);
+ if (!field.isEmpty())
+ return field;
+
const auto typeEntry = type.typeEntry();
EnumTypeEntryCPtr enumTypeEntry;
FlagsTypeEntryCPtr flagsTypeEntry;