aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken6/ApiExtractor/abstractmetatype.cpp
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2020-11-13 10:37:09 +0100
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2020-11-14 18:55:16 +0000
commita6dd968379935452462b5785e937c37b3561425f (patch)
treea5948a790b2a0f765a1b0e10231b0484b7502fd4 /sources/shiboken6/ApiExtractor/abstractmetatype.cpp
parentd06005c8b0acbb52c0ee74f2ccb8bc64fd482d18 (diff)
shiboken6: Use std::optional for returning AbstractMetaType
Remove its invalid state. Remove a few checks that apparently originated from the old code where AbstractMetaType * = 0 meant void. Change-Id: Ifc938c011f07f4b5316f708f6cce1e98bcaa8125 Reviewed-by: Christian Tismer <tismer@stackless.com>
Diffstat (limited to 'sources/shiboken6/ApiExtractor/abstractmetatype.cpp')
-rw-r--r--sources/shiboken6/ApiExtractor/abstractmetatype.cpp11
1 files changed, 1 insertions, 10 deletions
diff --git a/sources/shiboken6/ApiExtractor/abstractmetatype.cpp b/sources/shiboken6/ApiExtractor/abstractmetatype.cpp
index 9e515d4b4..362ae22ef 100644
--- a/sources/shiboken6/ApiExtractor/abstractmetatype.cpp
+++ b/sources/shiboken6/ApiExtractor/abstractmetatype.cpp
@@ -67,7 +67,7 @@ public:
AbstractMetaTypeCPtr m_viewOn;
AbstractMetaType::Indirections m_indirections;
- AbstractMetaType::TypeUsagePattern m_pattern = AbstractMetaType::InvalidPattern;
+ AbstractMetaType::TypeUsagePattern m_pattern = AbstractMetaType::VoidPattern;
uint m_constant : 1;
uint m_volatile : 1;
uint m_signaturesDirty : 1;
@@ -104,11 +104,6 @@ AbstractMetaType &AbstractMetaType::operator=(AbstractMetaType &&) = default;
AbstractMetaType::~AbstractMetaType() = default;
-bool AbstractMetaType::isValid() const
-{
- return d->m_pattern != AbstractMetaType::InvalidPattern;
-}
-
QString AbstractMetaType::package() const
{
return d->m_typeEntry->targetLangPackage();
@@ -685,10 +680,6 @@ AbstractMetaType AbstractMetaType::createVoid()
#ifndef QT_NO_DEBUG_STREAM
void AbstractMetaType::formatDebug(QDebug &debug) const
{
- if (!isValid()) {
- debug << "Invalid";
- return;
- }
debug << '"' << name() << '"';
if (debug.verbosity() > 2) {
auto te = typeEntry();