From a43c815a6fe38d60ded59776ba6e71d87a1eedc1 Mon Sep 17 00:00:00 2001 From: Matthew Woehlke Date: Thu, 1 Aug 2013 13:58:20 -0400 Subject: Clean up style Change wrapping and indent of some code in Handler::startElement to improve consistency. Change-Id: I13bae6bbb732e3c5791cf0079154feed8d8dcbd1 Reviewed-by: John Cummings --- ApiExtractor/typesystem.cpp | 37 +++++++++++++++++++------------------ 1 file changed, 19 insertions(+), 18 deletions(-) (limited to 'ApiExtractor') diff --git a/ApiExtractor/typesystem.cpp b/ApiExtractor/typesystem.cpp index 71814d6c9..9a99ce5f5 100644 --- a/ApiExtractor/typesystem.cpp +++ b/ApiExtractor/typesystem.cpp @@ -660,26 +660,27 @@ bool Handler::startElement(const QString &, const QString &n, type->setPreferredTargetLangType(preferred); element->entry = type; - } - break; - case StackElement::ContainerTypeEntry: - { - QString typeName = attributes["type"]; - ContainerTypeEntry::Type containerType = - ContainerTypeEntry::containerTypeFromString(typeName); - if (typeName.isEmpty()) { - m_error = "no 'type' attribute specified"; - return false; - } else if (containerType == ContainerTypeEntry::NoContainer) { - m_error = "there is no container of type " + containerType; - return false; - } + } + break; - ContainerTypeEntry *type = new ContainerTypeEntry(name, containerType, since); - type->setCodeGeneration(m_generate); - element->entry = type; + case StackElement::ContainerTypeEntry: { + QString typeName = attributes["type"]; + ContainerTypeEntry::Type containerType = + ContainerTypeEntry::containerTypeFromString(typeName); + if (typeName.isEmpty()) { + m_error = "no 'type' attribute specified"; + return false; + } else if (containerType == ContainerTypeEntry::NoContainer) { + m_error = "there is no container of type " + containerType; + return false; } - break; + + ContainerTypeEntry *type = new ContainerTypeEntry(name, containerType, since); + type->setCodeGeneration(m_generate); + element->entry = type; + } + break; + case StackElement::EnumTypeEntry: { QStringList names = name.split(QLatin1String("::")); if (names.size() == 1) -- cgit v1.2.3