diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2022-01-07 14:40:52 +0100 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2022-01-12 10:47:23 +0000 |
commit | 64ce15eeaa5c06f0629636407c5cd3ed95e52351 (patch) | |
tree | d9c855d7041744429804f490fbdfc953671be965 | |
parent | 831286b4fd751ceed5b3abcc1268b9cb46d0a6c7 (diff) |
shiboken6: Rename type system parser enumeration value for clarity
Rename TemplateInstanceEnum to InsertTemplate.
Task-number: PYSIDE-1766
Change-Id: I3876833c56c0cda067d187444b2bd761411fce8e
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
(cherry picked from commit bd0e0bdec184ae9f8e82a2c5e5101faf9be1db83)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r-- | sources/shiboken6/ApiExtractor/typesystemparser.cpp | 16 | ||||
-rw-r--r-- | sources/shiboken6/ApiExtractor/typesystemparser.h | 6 |
2 files changed, 11 insertions, 11 deletions
diff --git a/sources/shiboken6/ApiExtractor/typesystemparser.cpp b/sources/shiboken6/ApiExtractor/typesystemparser.cpp index ca5af051d..67afc649e 100644 --- a/sources/shiboken6/ApiExtractor/typesystemparser.cpp +++ b/sources/shiboken6/ApiExtractor/typesystemparser.cpp @@ -384,7 +384,7 @@ ENUM_LOOKUP_BEGIN(StackElement::ElementType, Qt::CaseInsensitive, {u"include", StackElement::Include}, {u"inject-code", StackElement::InjectCode}, {u"inject-documentation", StackElement::InjectDocumentation}, - {u"insert-template", StackElement::TemplateInstanceEnum}, + {u"insert-template", StackElement::InsertTemplate}, {u"interface-type", StackElement::InterfaceTypeEntry}, {u"load-typesystem", StackElement::LoadTypesystem}, {u"modify-argument", StackElement::ModifyArgument}, @@ -894,7 +894,7 @@ bool TypeSystemParser::endElement(QStringView localName) case StackElement::Template: m_database->addTemplate(m_current->templateEntry); break; - case StackElement::TemplateInstanceEnum: + case StackElement::InsertTemplate: switch (m_current->parent->type) { case StackElement::InjectCode: if (m_current->parent->parent->type == StackElement::Root) { @@ -2771,9 +2771,9 @@ bool TypeSystemParser::parseSystemInclude(const ConditionalStreamReader &, } TemplateInstance * - TypeSystemParser::parseTemplateInstanceEnum(const ConditionalStreamReader &, - const StackElement &topElement, - QXmlStreamAttributes *attributes) + TypeSystemParser::parseInsertTemplate(const ConditionalStreamReader &, + const StackElement &topElement, + QXmlStreamAttributes *attributes) { if (!(topElement.type & StackElement::CodeSnipMask) && (topElement.type != StackElement::Template) && @@ -2796,7 +2796,7 @@ bool TypeSystemParser::parseReplace(const ConditionalStreamReader &, const StackElement &topElement, StackElement *element, QXmlStreamAttributes *attributes) { - if (topElement.type != StackElement::TemplateInstanceEnum) { + if (topElement.type != StackElement::InsertTemplate) { m_error = QLatin1String("Can only insert replace rules into insert-template."); return false; } @@ -3245,9 +3245,9 @@ bool TypeSystemParser::startElement(const ConditionalStreamReader &reader) new TemplateEntry(attributes.takeAt(nameIndex).value().toString()); } break; - case StackElement::TemplateInstanceEnum: + case StackElement::InsertTemplate: element->templateInstance = - parseTemplateInstanceEnum(reader, topElement, &attributes); + parseInsertTemplate(reader, topElement, &attributes); if (!element->templateInstance) return false; break; diff --git a/sources/shiboken6/ApiExtractor/typesystemparser.h b/sources/shiboken6/ApiExtractor/typesystemparser.h index a44829d72..62b0aeb0c 100644 --- a/sources/shiboken6/ApiExtractor/typesystemparser.h +++ b/sources/shiboken6/ApiExtractor/typesystemparser.h @@ -83,7 +83,7 @@ class StackElement LoadTypesystem = 0x0b00, RejectEnumValue = 0x0c00, Template = 0x0d00, - TemplateInstanceEnum = 0x0e00, + InsertTemplate = 0x0e00, Replace = 0x0f00, AddFunction = 0x1000, DeclareFunction = 0x1100, @@ -249,8 +249,8 @@ private: TypeEntry *entry, QXmlStreamAttributes *); bool parseSystemInclude(const ConditionalStreamReader &, QXmlStreamAttributes *); TemplateInstance - *parseTemplateInstanceEnum(const ConditionalStreamReader &, const StackElement &topElement, - QXmlStreamAttributes *); + *parseInsertTemplate(const ConditionalStreamReader &, const StackElement &topElement, + QXmlStreamAttributes *); bool parseReplace(const ConditionalStreamReader &, const StackElement &topElement, StackElement *element, QXmlStreamAttributes *); bool checkDuplicatedTypeEntry(const ConditionalStreamReader &reader, |