aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken6/ApiExtractor/enumtypeentry.h
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2022-11-11 09:38:22 +0100
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2022-11-17 18:14:28 +0100
commitf499c71c3b3f78920be192d35df7e2c8d18e2f1b (patch)
tree1cf53d8b089cfcb054c395bb288951c945f6e582 /sources/shiboken6/ApiExtractor/enumtypeentry.h
parentcf4f1a7488ba3202b44081eade36debf1d665e8f (diff)
shiboken6: Use smart pointers for the TypeEntry classes
TypeEntry instances were previously stored and passed as raw pointers, which made it difficult to track ownership, particularly when synthesized classes were added. Change it to use QSharedPointer. Change-Id: I3612efbc5d467ebeac9aa5dda86c7439bbd03ddd Reviewed-by: Christian Tismer <tismer@stackless.com> Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
Diffstat (limited to 'sources/shiboken6/ApiExtractor/enumtypeentry.h')
-rw-r--r--sources/shiboken6/ApiExtractor/enumtypeentry.h12
1 files changed, 5 insertions, 7 deletions
diff --git a/sources/shiboken6/ApiExtractor/enumtypeentry.h b/sources/shiboken6/ApiExtractor/enumtypeentry.h
index 16e0362aa..14bab50cf 100644
--- a/sources/shiboken6/ApiExtractor/enumtypeentry.h
+++ b/sources/shiboken6/ApiExtractor/enumtypeentry.h
@@ -8,15 +8,13 @@
#include "typesystem_enums.h"
class EnumTypeEntryPrivate;
-class EnumValueTypeEntry;
-class FlagsTypeEntry;
class EnumTypeEntry : public TypeEntry
{
public:
explicit EnumTypeEntry(const QString &entryName,
const QVersionNumber &vr,
- const TypeEntry *parent);
+ const TypeEntryCPtr &parent);
TypeSystem::PythonEnumType pythonEnumType() const;
void setPythonEnumType(TypeSystem::PythonEnumType t);
@@ -25,11 +23,11 @@ public:
QString qualifier() const;
- const EnumValueTypeEntry *nullValue() const;
- void setNullValue(const EnumValueTypeEntry *n);
+ EnumValueTypeEntryCPtr nullValue() const;
+ void setNullValue(const EnumValueTypeEntryCPtr &n);
- void setFlags(FlagsTypeEntry *flags);
- FlagsTypeEntry *flags() const;
+ void setFlags(const FlagsTypeEntryPtr &flags);
+ FlagsTypeEntryPtr flags() const;
QString cppType() const;
void setCppType(const QString &t);