diff options
author | Friedemann Kleint <[email protected]> | 2023-12-04 10:41:14 +0100 |
---|---|---|
committer | Friedemann Kleint <[email protected]> | 2023-12-06 10:36:07 +0100 |
commit | 916c7771e61c247475e5316b9dedbe9e963c671a (patch) | |
tree | aa21ad600c4b2a8daccae931ac58a9d427a68a3e | |
parent | 165a7b8b7345093d523be02b0353ba8b579a18fd (diff) |
Documentation: Generate enum name for flags
The actual flags name is not used, it is merely an alias in the type
dict.
Fixes: PYSIDE-2539
Pick-to: 6.6
Change-Id: Id7f5c8236091790ac9c10595787b86471e300065
Reviewed-by: Shyamnath Premnadh <[email protected]>
-rw-r--r-- | sources/shiboken6/generator/qtdoc/qtdocgenerator.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sources/shiboken6/generator/qtdoc/qtdocgenerator.cpp b/sources/shiboken6/generator/qtdoc/qtdocgenerator.cpp index faa3fb8a3..f95fe489d 100644 --- a/sources/shiboken6/generator/qtdoc/qtdocgenerator.cpp +++ b/sources/shiboken6/generator/qtdoc/qtdocgenerator.cpp @@ -25,6 +25,7 @@ #include <functiontypeentry.h> #include <enumtypeentry.h> #include <complextypeentry.h> +#include <flagstypeentry.h> #include <primitivetypeentry.h> #include <qtdocparser.h> #include <doxygenparser.h> @@ -719,6 +720,12 @@ QString QtDocGenerator::translateToPythonType(const AbstractMetaType &type, if (found != typeMap.cend()) return found.value(); + if (type.isFlags()) { + const auto fte = std::static_pointer_cast<const FlagsTypeEntry>(type.typeEntry()); + auto enumName = fte->originator()->targetLangName(); + return "Combination of "_L1 + (createRef ? toRef(enumName) : enumName); + } + if (type.isConstant() && name == "char"_L1 && type.indirections() == 1) return "str"_L1; |