aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside6/libpyside/pysideqenum.h
diff options
context:
space:
mode:
authorRenato Araujo Oliveira Filho <renato.araujo@kdab.com>2025-04-17 11:20:02 -0300
committerRenato Araujo Oliveira Filho <renato.araujo@kdab.com>2025-04-23 10:12:13 -0300
commitcaa9d339c3ba96879ae5972b08787506ec36d92b (patch)
tree4be4c695f2eff0654ccd1745b5c5a9d4d2320a65 /sources/pyside6/libpyside/pysideqenum.h
parent2f55adcea4b5d058bb600c2f2cc78106c93e10b8 (diff)
Fix QMetaEnum conversions into QVariant
Make sure to store QtEnums in QVariant when the enum has a metatype. Fixes: PYSIDE-3084 Change-Id: I94b89f89e6fb3c58560325f2a6843a5260d86557 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'sources/pyside6/libpyside/pysideqenum.h')
-rw-r--r--sources/pyside6/libpyside/pysideqenum.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/sources/pyside6/libpyside/pysideqenum.h b/sources/pyside6/libpyside/pysideqenum.h
index e97db0730..cfc361004 100644
--- a/sources/pyside6/libpyside/pysideqenum.h
+++ b/sources/pyside6/libpyside/pysideqenum.h
@@ -10,6 +10,8 @@
#include <vector>
+#include <QtCore/qbytearray.h>
+
namespace PySide::QEnum {
// PYSIDE-957: Support the QEnum macro
@@ -18,6 +20,11 @@ PYSIDE_API int isFlag(PyObject *);
PYSIDE_API std::vector<PyObject *> resolveDelayedQEnums(PyTypeObject *);
PYSIDE_API void init();
+
+// PYSIDE-2840: For an enum registered in Qt, return the C++ name.
+// Ignore flags here; their underlying enums are of Python type flags anyways.
+PYSIDE_API QByteArray getTypeName(PyTypeObject *type);
+
} // namespace PySide::QEnum
#endif