aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken6/ApiExtractor/modifications.cpp
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2020-12-02 09:23:12 +0100
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2020-12-02 10:32:11 +0000
commit357fd41a812dc5d4439e39470eb912ac295c0f48 (patch)
treed48af8d70ec6d95efb859c36bfc1986d2a269660 /sources/shiboken6/ApiExtractor/modifications.cpp
parentb69d8899b1c592aa9a6cdfa43da3137af3fa16de (diff)
shiboken6: Simplify handling of removed attribute
The meaning of the TypeSystem::Language enumeration value on the remove elements was unclear; and it is only ever used with 'all'. Replace it by a boolean value and simplify the code accordingly. Adapt the documentation. Change-Id: I82d082e6d551403642936294a11abbac09d723dd Reviewed-by: Christian Tismer <tismer@stackless.com>
Diffstat (limited to 'sources/shiboken6/ApiExtractor/modifications.cpp')
-rw-r--r--sources/shiboken6/ApiExtractor/modifications.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/sources/shiboken6/ApiExtractor/modifications.cpp b/sources/shiboken6/ApiExtractor/modifications.cpp
index fe3983ce1..e70c7f7d8 100644
--- a/sources/shiboken6/ApiExtractor/modifications.cpp
+++ b/sources/shiboken6/ApiExtractor/modifications.cpp
@@ -459,7 +459,7 @@ class ModificationData : public QSharedData
public:
QString renamedToName;
Modification::Modifiers modifiers;
- TypeSystem::Language removal = TypeSystem::NoLanguage;
+ bool removed = false;
};
Modification::Modification() : md(new ModificationData)
@@ -475,8 +475,8 @@ Modification::~Modification() = default;
void Modification::formatDebug(QDebug &debug) const
{
debug << "modifiers=" << md->modifiers;
- if (md->removal)
- debug << ", removal";
+ if (md->removed)
+ debug << ", removed";
if (!md->renamedToName.isEmpty())
debug << ", renamedToName=\"" << md->renamedToName << '"';
}
@@ -517,15 +517,15 @@ void Modification::clearModifierFlag(ModifierFlag f)
md->modifiers = newMods;
}
-TypeSystem::Language Modification::removal() const
+bool Modification::isRemoved() const
{
- return md->removal;
+ return md->removed;
}
-void Modification::setRemoval(TypeSystem::Language r)
+void Modification::setRemoved(bool r)
{
- if (md->removal != r)
- md->removal = r;
+ if (md->removed != r)
+ md->removed = r;
}
class FunctionModificationData : public QSharedData