aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken2/ApiExtractor/typesystem.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'sources/shiboken2/ApiExtractor/typesystem.cpp')
-rw-r--r--sources/shiboken2/ApiExtractor/typesystem.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/sources/shiboken2/ApiExtractor/typesystem.cpp b/sources/shiboken2/ApiExtractor/typesystem.cpp
index c6f723e4d..8564da3c4 100644
--- a/sources/shiboken2/ApiExtractor/typesystem.cpp
+++ b/sources/shiboken2/ApiExtractor/typesystem.cpp
@@ -373,6 +373,7 @@ bool Handler::endElement(const QStringRef &localName)
m_current->parent->entry->setCodeSnips(snips);
break;
}
+ Q_FALLTHROUGH();
case StackElement::NativeToTarget:
case StackElement::AddConversion:
m_contextStack.top()->codeSnips.last().addTemplateInstance(m_current->value.templateInstance);
@@ -756,20 +757,20 @@ bool Handler::startElement(const QStringRef &n, const QXmlStreamAttributes &atts
break;
case StackElement::ValueTypeEntry:
attributes.insert(QLatin1String("default-constructor"), QString());
- // fall throooough
+ Q_FALLTHROUGH();
case StackElement::ObjectTypeEntry:
attributes.insert(QLatin1String("force-abstract"), QLatin1String("no"));
attributes.insert(QLatin1String("deprecated"), QLatin1String("no"));
attributes.insert(QLatin1String("hash-function"), QString());
attributes.insert(QLatin1String("stream"), QLatin1String("no"));
- // fall throooough
+ Q_FALLTHROUGH();
case StackElement::InterfaceTypeEntry:
attributes[QLatin1String("default-superclass")] = m_defaultSuperclass;
attributes.insert(QLatin1String("polymorphic-id-expression"), QString());
attributes.insert(QLatin1String("delete-in-main-thread"), QLatin1String("no"));
attributes.insert(QLatin1String("held-type"), QString());
attributes.insert(QLatin1String("copyable"), QString());
- // fall through
+ Q_FALLTHROUGH();
case StackElement::NamespaceTypeEntry:
attributes.insert(QLatin1String("target-lang-name"), QString());
attributes[QLatin1String("package")] = m_defaultPackage;
@@ -968,7 +969,7 @@ bool Handler::startElement(const QStringRef &n, const QXmlStreamAttributes &atts
itype->setOrigin(otype);
element->entry = otype;
}
- // fall through
+ Q_FALLTHROUGH();
case StackElement::ValueTypeEntry: {
if (!element->entry) {
ValueTypeEntry* typeEntry = new ValueTypeEntry(name, since);
@@ -978,12 +979,12 @@ bool Handler::startElement(const QStringRef &n, const QXmlStreamAttributes &atts
element->entry = typeEntry;
}
- // fall through
+ Q_FALLTHROUGH();
case StackElement::NamespaceTypeEntry:
if (!element->entry)
element->entry = new NamespaceTypeEntry(name, since);
- // fall through
+ Q_FALLTHROUGH();
case StackElement::ObjectTypeEntry:
if (!element->entry)
element->entry = new ObjectTypeEntry(name, since);
@@ -1334,13 +1335,12 @@ bool Handler::startElement(const QStringRef &n, const QXmlStreamAttributes &atts
}
}
break;
- case StackElement::RejectEnumValue: {
+ case StackElement::RejectEnumValue:
if (!m_currentEnum) {
m_error = QLatin1String("<reject-enum-value> node must be used inside a <enum-type> node");
return false;
}
- QString name = attributes[nameAttribute()];
- } break;
+ break;
case StackElement::ReplaceType: {
if (topElement.type != StackElement::ModifyArgument) {
m_error = QLatin1String("Type replacement can only be specified for argument modifications");
@@ -2495,7 +2495,7 @@ AddedFunction::AddedFunction(QString signature, QString returnType, double vr) :
break;
}
// is const?
- m_isConst = signature.right(signatureLength - endPos).contains(QLatin1String("const"));
+ m_isConst = signature.rightRef(signatureLength - endPos).contains(QLatin1String("const"));
}
}