aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken2/ApiExtractor
diff options
context:
space:
mode:
authorChristian Tismer <tismer@stackless.com>2019-06-16 12:05:39 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2019-06-24 11:25:31 +0200
commit380c65e62de0e60da667dc0d87935171b91b9c6c (patch)
tree480c872f247316a66e446ba196a5bd1a339a0bcd /sources/shiboken2/ApiExtractor
parent992ff1f7925009b7ead6d6f005cafcf2e57ed44e (diff)
Cleanup pointer whitespace everywhere
Among other files to fix, basewrapper.(cpp|h) was full of uncommon pointer whitespace. After fixing that, I could not resist and fixed also libshiboken, generators, and after acceptance also PySide. Most of the time, this regex worked fine (\w\w+)([*&]+)[ ]*(?![&*]*[/=]) replaced with \1 \2 but everything was checked by hand. I did not touch the shiboken tests which are quite hairy. It turned out that inserting a space between a variable and asterisk causes a crash of shiboken, if the same line contains "CONVERTTOCPP". This was temporarily fixed by adding another space after it. Example.. sources/pyside2/PySide2/glue/qtcore.cpp line 977 QByteArray * cppSelf = %CONVERTTOCPP[QByteArray *](obj); //XXX /|\ omitting this space crashes shiboken! cppgenerator.cpp was special, since it was modified to _generate_ correct pointer whitespace. This caused a few testcases to fail, which had to be adjusted, again. This was difficult since some internal names must end on "*" and generated code normally not. Removing the last errors involved binary search on path sets... Apply C++ 11 fixits to the changed code, where applicable. Done-with: Friedemann.Kleint@qt.io Task-number: PYSIDE-1037 Change-Id: I4ac070f52c5efb296c05d581c9d46e6f397a6c81 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'sources/shiboken2/ApiExtractor')
-rw-r--r--sources/shiboken2/ApiExtractor/abstractmetabuilder.cpp68
-rw-r--r--sources/shiboken2/ApiExtractor/abstractmetalang.cpp22
-rw-r--r--sources/shiboken2/ApiExtractor/typedatabase.h58
3 files changed, 74 insertions, 74 deletions
diff --git a/sources/shiboken2/ApiExtractor/abstractmetabuilder.cpp b/sources/shiboken2/ApiExtractor/abstractmetabuilder.cpp
index 170a8e1d4..d3a232546 100644
--- a/sources/shiboken2/ApiExtractor/abstractmetabuilder.cpp
+++ b/sources/shiboken2/ApiExtractor/abstractmetabuilder.cpp
@@ -62,7 +62,7 @@ static QString stripTemplateArgs(const QString &name)
return pos < 0 ? name : name.left(pos);
}
-static QStringList parseTemplateType(const QString& name) {
+static QStringList parseTemplateType(const QString &name) {
int n = name.indexOf(QLatin1Char('<'));
if (n <= 0) {
// If name starts with '<' or contains an unmatched (i.e. any) '>', we
@@ -164,7 +164,7 @@ AbstractMetaEnumList AbstractMetaBuilder::globalEnums() const
AbstractMetaEnum *AbstractMetaBuilder::findEnum(const TypeEntry *typeEntry) const
{
if (typeEntry && typeEntry->isFlags())
- typeEntry = static_cast<const FlagsTypeEntry*>(typeEntry)->originator();
+ typeEntry = static_cast<const FlagsTypeEntry *>(typeEntry)->originator();
return d->m_enums.value(typeEntry);
}
@@ -179,7 +179,7 @@ void AbstractMetaBuilderPrivate::checkFunctionModifications()
if (!entry->isComplex() || entry->codeGeneration() == TypeEntry::GenerateNothing)
continue;
- const ComplexTypeEntry* centry = static_cast<const ComplexTypeEntry*>(entry);
+ auto centry = static_cast<const ComplexTypeEntry *>(entry);
if (!(centry->codeGeneration() & TypeEntry::GenerateTargetLang))
continue;
@@ -226,7 +226,7 @@ void AbstractMetaBuilderPrivate::checkFunctionModifications()
AbstractMetaClass *AbstractMetaBuilderPrivate::argumentToClass(const ArgumentModelItem &argument,
AbstractMetaClass *currentClass)
{
- AbstractMetaClass* returned = 0;
+ AbstractMetaClass *returned = nullptr;
AbstractMetaType *type = translateType(argument->type(), currentClass);
if (type && type->typeEntry() && type->typeEntry()->isComplex()) {
const TypeEntry *entry = type->typeEntry();
@@ -306,7 +306,7 @@ void AbstractMetaBuilderPrivate::traverseOperatorFunction(const FunctionModelIte
// Strip away first argument, since that is the containing object
AbstractMetaArgumentList arguments = metaFunction->arguments();
if (firstArgumentIsSelf || unaryOperator) {
- AbstractMetaArgument* first = arguments.takeFirst();
+ AbstractMetaArgument *first = arguments.takeFirst();
if (!unaryOperator && first->type()->indirections())
metaFunction->setPointerOperator(true);
delete first;
@@ -317,7 +317,7 @@ void AbstractMetaBuilderPrivate::traverseOperatorFunction(const FunctionModelIte
// must be an reverse operator (e.g. CLASS::operator(TYPE, CLASS)).
// All operator overloads that operate over a class are already
// being added as member functions of that class by the API Extractor.
- AbstractMetaArgument* last = arguments.takeLast();
+ AbstractMetaArgument *last = arguments.takeLast();
if (last->type()->indirections())
metaFunction->setPointerOperator(true);
delete last;
@@ -479,11 +479,11 @@ void AbstractMetaBuilderPrivate::traverseDom(const FileModelItem &dom)
if (func->accessPolicy() != CodeModel::Public || func->name().startsWith(QLatin1String("operator")))
continue;
- FunctionTypeEntry* funcEntry = types->findFunctionType(func->name());
+ FunctionTypeEntry *funcEntry = types->findFunctionType(func->name());
if (!funcEntry || !funcEntry->generateCode())
continue;
- AbstractMetaFunction* metaFunc = traverseFunction(func, nullptr);
+ AbstractMetaFunction *metaFunc = traverseFunction(func, nullptr);
if (!metaFunc)
continue;
@@ -551,11 +551,11 @@ void AbstractMetaBuilderPrivate::traverseDom(const FileModelItem &dom)
<< QStringLiteral("type '%1' is specified in typesystem, but not defined. This could potentially lead to compilation errors.")
.arg(entry->qualifiedCppName());
} else if (entry->generateCode() && entry->type() == TypeEntry::FunctionType) {
- const FunctionTypeEntry* fte = static_cast<const FunctionTypeEntry*>(entry);
+ auto fte = static_cast<const FunctionTypeEntry *>(entry);
const QStringList &signatures = fte->signatures();
for (const QString &signature : signatures) {
bool ok = false;
- for (AbstractMetaFunction* func : qAsConst(m_globalFunctions)) {
+ for (AbstractMetaFunction *func : qAsConst(m_globalFunctions)) {
if (signature == func->minimalSignature()) {
ok = true;
break;
@@ -642,7 +642,7 @@ void AbstractMetaBuilderPrivate::traverseDom(const FileModelItem &dom)
// sort all classes topologically
m_metaClasses = classesTopologicalSorted(m_metaClasses);
- for (AbstractMetaClass* cls : qAsConst(m_metaClasses)) {
+ for (AbstractMetaClass *cls : qAsConst(m_metaClasses)) {
// setupEquals(cls);
// setupComparable(cls);
setupClonable(cls);
@@ -662,7 +662,7 @@ void AbstractMetaBuilderPrivate::traverseDom(const FileModelItem &dom)
// Functions added to the module on the type system.
const AddedFunctionList &globalUserFunctions = types->globalUserFunctions();
for (const AddedFunctionPtr &addedFunc : globalUserFunctions) {
- AbstractMetaFunction* metaFunc = traverseFunction(addedFunc);
+ AbstractMetaFunction *metaFunc = traverseFunction(addedFunc);
if (Q_UNLIKELY(!metaFunc)) {
qFatal("Unable to traverse added global function \"%s\".",
qPrintable(addedFunc->name()));
@@ -706,7 +706,7 @@ bool AbstractMetaBuilder::build(const QByteArrayList &arguments,
return true;
}
-void AbstractMetaBuilder::setLogDirectory(const QString& logDir)
+void AbstractMetaBuilder::setLogDirectory(const QString &logDir)
{
d->m_logDirectory = logDir;
if (!d->m_logDirectory.endsWith(QDir::separator()))
@@ -725,7 +725,7 @@ void AbstractMetaBuilderPrivate::addAbstractMetaClass(AbstractMetaClass *cls,
} else {
m_metaClasses << cls;
if (cls->typeEntry()->designatedInterface()) {
- AbstractMetaClass* interface = cls->extractInterface();
+ AbstractMetaClass *interface = cls->extractInterface();
m_metaClasses << interface;
if (ReportHandler::isDebug(ReportHandler::SparseDebug))
qCDebug(lcShiboken) << QStringLiteral(" -> interface '%1'").arg(interface->name());
@@ -784,7 +784,7 @@ AbstractMetaClass *AbstractMetaBuilderPrivate::traverseNamespace(const FileModel
const ClassList &classes = namespaceItem->classes();
for (const ClassModelItem &cls : classes) {
- AbstractMetaClass* mjc = traverseClass(dom, cls, metaClass);
+ AbstractMetaClass *mjc = traverseClass(dom, cls, metaClass);
if (mjc) {
metaClass->addInnerClass(mjc);
mjc->setEnclosingClass(metaClass);
@@ -806,7 +806,7 @@ AbstractMetaClass *AbstractMetaBuilderPrivate::traverseNamespace(const FileModel
// Traverse namespaces recursively
for (const NamespaceModelItem &ni : namespaceItem->namespaces()) {
- AbstractMetaClass* mjc = traverseNamespace(dom, ni);
+ AbstractMetaClass *mjc = traverseNamespace(dom, ni);
if (mjc) {
metaClass->addInnerClass(mjc);
mjc->setEnclosingClass(metaClass);
@@ -827,7 +827,7 @@ AbstractMetaEnum *AbstractMetaBuilderPrivate::traverseEnum(const EnumModelItem &
{
QString qualifiedName = enumItem->qualifiedName().join(colonColon());
- TypeEntry* typeEntry = 0;
+ TypeEntry *typeEntry = nullptr;
if (enumItem->accessPolicy() == CodeModel::Private) {
QStringList names = enumItem->qualifiedName();
const QString &enumName = names.constLast();
@@ -841,7 +841,7 @@ AbstractMetaEnum *AbstractMetaBuilderPrivate::traverseEnum(const EnumModelItem &
} else {
QStringList tmpQualifiedName = enumItem->qualifiedName();
const EnumeratorList &enums = enumItem->enumerators();
- for (const EnumeratorModelItem& enumValue : enums) {
+ for (const EnumeratorModelItem &enumValue : enums) {
tmpQualifiedName.removeLast();
tmpQualifiedName << enumValue->name();
qualifiedName = tmpQualifiedName.join(colonColon());
@@ -964,11 +964,11 @@ AbstractMetaEnum *AbstractMetaBuilderPrivate::traverseEnum(const EnumModelItem &
return metaEnum;
}
-AbstractMetaClass* AbstractMetaBuilderPrivate::traverseTypeDef(const FileModelItem &dom,
+AbstractMetaClass *AbstractMetaBuilderPrivate::traverseTypeDef(const FileModelItem &dom,
const TypeDefModelItem &typeDef,
AbstractMetaClass *currentClass)
{
- TypeDatabase* types = TypeDatabase::instance();
+ TypeDatabase *types = TypeDatabase::instance();
QString className = stripTemplateArgs(typeDef->name());
QString fullClassName = className;
@@ -981,7 +981,7 @@ AbstractMetaClass* AbstractMetaBuilderPrivate::traverseTypeDef(const FileModelIt
// If this is the alias for a primitive type
// we store the aliased type on the alias
// TypeEntry
- PrimitiveTypeEntry* ptype = types->findPrimitiveType(className);
+ PrimitiveTypeEntry *ptype = types->findPrimitiveType(className);
if (ptype) {
QString typeDefName = typeDef->type().qualifiedName()[0];
ptype->setReferencedTypeEntry(types->findPrimitiveType(typeDefName));
@@ -990,7 +990,7 @@ AbstractMetaClass* AbstractMetaBuilderPrivate::traverseTypeDef(const FileModelIt
// If we haven't specified anything for the typedef, then we don't care
- ComplexTypeEntry* type = types->findComplexType(fullClassName);
+ ComplexTypeEntry *type = types->findComplexType(fullClassName);
if (!type)
return 0;
@@ -1038,7 +1038,7 @@ AbstractMetaClass *AbstractMetaBuilderPrivate::traverseClass(const FileModelItem
+ colonColon() + fullClassName;
}
- ComplexTypeEntry* type = TypeDatabase::instance()->findComplexType(fullClassName);
+ ComplexTypeEntry *type = TypeDatabase::instance()->findComplexType(fullClassName);
AbstractMetaBuilder::RejectReason reason = AbstractMetaBuilder::NoReason;
if (TypeDatabase::instance()->isClassRejected(fullClassName)) {
@@ -1138,13 +1138,13 @@ void AbstractMetaBuilderPrivate::traverseScopeMembers(ScopeModelItem item,
// Inner classes
const ClassList &innerClasses = item->classes();
- for (const ClassModelItem& ci : innerClasses)
+ for (const ClassModelItem &ci : innerClasses)
traverseClassMembers(ci);
}
void AbstractMetaBuilderPrivate::traverseClassMembers(ClassModelItem item)
{
- AbstractMetaClass* metaClass = m_itemToClass.value(item.data());
+ AbstractMetaClass *metaClass = m_itemToClass.value(item.data());
if (!metaClass)
return;
@@ -1154,7 +1154,7 @@ void AbstractMetaBuilderPrivate::traverseClassMembers(ClassModelItem item)
void AbstractMetaBuilderPrivate::traverseNamespaceMembers(NamespaceModelItem item)
{
- AbstractMetaClass* metaClass = m_itemToClass.value(item.data());
+ AbstractMetaClass *metaClass = m_itemToClass.value(item.data());
if (!metaClass)
return;
@@ -1240,7 +1240,7 @@ void AbstractMetaBuilderPrivate::traverseFields(const ScopeModelItem &scope_item
{
const VariableList &variables = scope_item->variables();
for (const VariableModelItem &field : variables) {
- AbstractMetaField* metaField = traverseField(field, metaClass);
+ AbstractMetaField *metaField = traverseField(field, metaClass);
if (metaField && !metaField->isModifiedRemoved()) {
metaField->setOriginalAttributes(metaField->attributes());
@@ -1269,7 +1269,7 @@ void AbstractMetaBuilderPrivate::fixReturnTypeOfConversionOperator(AbstractMetaF
if (!metaFunction->isConversionOperator())
return;
- TypeDatabase* types = TypeDatabase::instance();
+ TypeDatabase *types = TypeDatabase::instance();
static const QRegularExpression operatorRegExp(QStringLiteral("^operator "));
Q_ASSERT(operatorRegExp.isValid());
QString castTo = metaFunction->name().remove(operatorRegExp).trimmed();
@@ -1279,22 +1279,22 @@ void AbstractMetaBuilderPrivate::fixReturnTypeOfConversionOperator(AbstractMetaF
if (castTo.startsWith(QLatin1String("const ")))
castTo.remove(0, 6);
- TypeEntry* retType = types->findType(castTo);
+ TypeEntry *retType = types->findType(castTo);
if (!retType)
return;
- AbstractMetaType* metaType = new AbstractMetaType;
+ AbstractMetaType *metaType = new AbstractMetaType;
metaType->setTypeEntry(retType);
metaFunction->replaceType(metaType);
}
-static bool _compareAbstractMetaTypes(const AbstractMetaType* type, const AbstractMetaType* other)
+static bool _compareAbstractMetaTypes(const AbstractMetaType *type, const AbstractMetaType *other)
{
return (type != nullptr) == (other != nullptr)
&& (type == nullptr || *type == *other);
}
-static bool _compareAbstractMetaFunctions(const AbstractMetaFunction* func, const AbstractMetaFunction* other)
+static bool _compareAbstractMetaFunctions(const AbstractMetaFunction *func, const AbstractMetaFunction *other)
{
if (!func && !other)
return true;
@@ -1377,14 +1377,14 @@ void AbstractMetaBuilderPrivate::traverseFunctions(ScopeModelItem scopeItem,
*metaFunction += AbstractMetaAttributes::PropertyReader;
metaFunction->setPropertySpec(read);
}
- } else if (QPropertySpec* write = metaClass->propertySpecForWrite(metaFunction->name())) {
+ } else if (QPropertySpec *write = metaClass->propertySpecForWrite(metaFunction->name())) {
// Property setter must be in the form "void name(<type>)"
// make sure the function was created with all aguments, some argument can be missing during the pareser because of errors on typesystem
if ((!metaFunction->type()) && (metaFunction->arguments().size() == 1) && (write->type() == metaFunction->arguments().at(0)->type()->typeEntry())) {
*metaFunction += AbstractMetaAttributes::PropertyWriter;
metaFunction->setPropertySpec(write);
}
- } else if (QPropertySpec* reset = metaClass->propertySpecForReset(metaFunction->name())) {
+ } else if (QPropertySpec *reset = metaClass->propertySpecForReset(metaFunction->name())) {
// Property resetter must be in the form "void name()"
if ((!metaFunction->type()) && metaFunction->arguments().isEmpty()) {
*metaFunction += AbstractMetaAttributes::PropertyResetter;
diff --git a/sources/shiboken2/ApiExtractor/abstractmetalang.cpp b/sources/shiboken2/ApiExtractor/abstractmetalang.cpp
index 512efef58..7bcad504d 100644
--- a/sources/shiboken2/ApiExtractor/abstractmetalang.cpp
+++ b/sources/shiboken2/ApiExtractor/abstractmetalang.cpp
@@ -963,7 +963,7 @@ QString AbstractMetaFunction::debugSignature() const
return result;
}
-FunctionModificationList AbstractMetaFunction::modifications(const AbstractMetaClass* implementor) const
+FunctionModificationList AbstractMetaFunction::modifications(const AbstractMetaClass *implementor) const
{
if (!m_addedFunction.isNull())
return m_addedFunction->modifications;
@@ -1042,7 +1042,7 @@ bool AbstractMetaFunction::hasSignatureModifications() const
return false;
}
-bool AbstractMetaFunction::isConversionOperator(const QString& funcName)
+bool AbstractMetaFunction::isConversionOperator(const QString &funcName)
{
static const QRegularExpression opRegEx(QStringLiteral("^operator(?:\\s+(?:const|volatile))?\\s+(\\w+\\s*)&?$"));
Q_ASSERT(opRegEx.isValid());
@@ -1107,7 +1107,7 @@ bool AbstractMetaFunction::generateExceptionHandling() const
return result;
}
-bool AbstractMetaFunction::isOperatorOverload(const QString& funcName)
+bool AbstractMetaFunction::isOperatorOverload(const QString &funcName)
{
if (isConversionOperator(funcName))
return true;
@@ -1679,7 +1679,7 @@ bool AbstractMetaClass::hasFunction(const QString &str) const
return findFunction(str);
}
-const AbstractMetaFunction* AbstractMetaClass::findFunction(const QString& functionName) const
+const AbstractMetaFunction *AbstractMetaClass::findFunction(const QString &functionName) const
{
return AbstractMetaFunction::find(m_functions, functionName);
}
@@ -1732,7 +1732,7 @@ QPropertySpec *AbstractMetaClass::propertySpecForReset(const QString &name) cons
return 0;
}
-typedef QHash<const AbstractMetaClass*, AbstractMetaTypeList> AbstractMetaClassBaseTemplateInstantiationsMap;
+typedef QHash<const AbstractMetaClass *, AbstractMetaTypeList> AbstractMetaClassBaseTemplateInstantiationsMap;
Q_GLOBAL_STATIC(AbstractMetaClassBaseTemplateInstantiationsMap, metaClassBaseTemplateInstantiations);
bool AbstractMetaClass::hasTemplateBaseClassInstantiations() const
@@ -1749,7 +1749,7 @@ AbstractMetaTypeList AbstractMetaClass::templateBaseClassInstantiations() const
return metaClassBaseTemplateInstantiations()->value(this);
}
-void AbstractMetaClass::setTemplateBaseClassInstantiations(AbstractMetaTypeList& instantiations)
+void AbstractMetaClass::setTemplateBaseClassInstantiations(AbstractMetaTypeList &instantiations)
{
if (!templateBaseClass())
return;
@@ -2018,20 +2018,20 @@ void AbstractMetaClass::addDefaultConstructor()
void AbstractMetaClass::addDefaultCopyConstructor(bool isPrivate)
{
- AbstractMetaFunction* f = new AbstractMetaFunction;
+ auto f = new AbstractMetaFunction;
f->setOriginalName(name());
f->setName(name());
f->setOwnerClass(this);
f->setFunctionType(AbstractMetaFunction::CopyConstructorFunction);
f->setDeclaringClass(this);
- AbstractMetaType* argType = new AbstractMetaType;
+ auto argType = new AbstractMetaType;
argType->setTypeEntry(typeEntry());
argType->setReferenceType(LValueReference);
argType->setConstant(true);
argType->setTypeUsagePattern(AbstractMetaType::ValuePattern);
- AbstractMetaArgument* arg = new AbstractMetaArgument;
+ auto arg = new AbstractMetaArgument;
arg->setType(argType);
arg->setName(name());
f->addArgument(arg);
@@ -2647,9 +2647,9 @@ AbstractMetaClass *AbstractMetaClass::findClass(const AbstractMetaClassList &cla
}
AbstractMetaClass *AbstractMetaClass::findClass(const AbstractMetaClassList &classes,
- const TypeEntry* typeEntry)
+ const TypeEntry *typeEntry)
{
- for (AbstractMetaClass* c : classes) {
+ for (AbstractMetaClass *c : classes) {
if (c->typeEntry() == typeEntry)
return c;
}
diff --git a/sources/shiboken2/ApiExtractor/typedatabase.h b/sources/shiboken2/ApiExtractor/typedatabase.h
index 7f1b2a3fc..df614e644 100644
--- a/sources/shiboken2/ApiExtractor/typedatabase.h
+++ b/sources/shiboken2/ApiExtractor/typedatabase.h
@@ -72,30 +72,30 @@ public:
* \param newInstance This parameter is useful just for unit testing, because singletons causes
* too many side effects on unit testing.
*/
- static TypeDatabase* instance(bool newInstance = false);
+ static TypeDatabase *instance(bool newInstance = false);
static QString normalizedSignature(const QString &signature);
QStringList requiredTargetImports() const;
- void addRequiredTargetImport(const QString& moduleName);
+ void addRequiredTargetImport(const QString &moduleName);
- void addTypesystemPath(const QString& typesystem_paths);
+ void addTypesystemPath(const QString &typesystem_paths);
- IncludeList extraIncludes(const QString& className) const;
+ IncludeList extraIncludes(const QString &className) const;
- PrimitiveTypeEntry* findPrimitiveType(const QString& name) const;
- ComplexTypeEntry* findComplexType(const QString& name) const;
- ObjectTypeEntry* findObjectType(const QString& name) const;
- NamespaceTypeEntryList findNamespaceTypes(const QString& name) const;
- NamespaceTypeEntry *findNamespaceType(const QString& name, const QString &fileName = QString()) const;
- ContainerTypeEntry* findContainerType(const QString& name) const;
- FunctionTypeEntry* findFunctionType(const QString& name) const;
+ PrimitiveTypeEntry *findPrimitiveType(const QString &name) const;
+ ComplexTypeEntry *findComplexType(const QString &name) const;
+ ObjectTypeEntry *findObjectType(const QString &name) const;
+ NamespaceTypeEntryList findNamespaceTypes(const QString &name) const;
+ NamespaceTypeEntry *findNamespaceType(const QString &name, const QString &fileName = QString()) const;
+ ContainerTypeEntry *findContainerType(const QString &name) const;
+ FunctionTypeEntry *findFunctionType(const QString &name) const;
const TypeSystemTypeEntry *findTypeSystemType(const QString &name) const;
const TypeSystemTypeEntry *defaultTypeSystemType() const;
QString defaultPackageName() const;
- TypeEntry* findType(const QString& name) const;
+ TypeEntry *findType(const QString &name) const;
const TypeEntryMultiMap &entries() const { return m_entries; }
const TypedefEntryMap &typedefEntries() const { return m_typedefEntries; }
@@ -105,59 +105,59 @@ public:
ContainerTypeEntryList containerTypes() const;
void addRejection(const TypeRejection &);
- bool isClassRejected(const QString& className, QString *reason = nullptr) const;
- bool isFunctionRejected(const QString& className, const QString& functionName,
+ bool isClassRejected(const QString &className, QString *reason = nullptr) const;
+ bool isFunctionRejected(const QString &className, const QString &functionName,
QString *reason = nullptr) const;
- bool isFieldRejected(const QString& className, const QString& fieldName,
+ bool isFieldRejected(const QString &className, const QString &fieldName,
QString *reason = nullptr) const;
- bool isEnumRejected(const QString& className, const QString& enumName,
+ bool isEnumRejected(const QString &className, const QString &enumName,
QString *reason = nullptr) const;
- bool isArgumentTypeRejected(const QString& className, const QString& typeName,
+ bool isArgumentTypeRejected(const QString &className, const QString &typeName,
QString *reason = nullptr) const;
- bool isReturnTypeRejected(const QString& className, const QString& typeName,
+ bool isReturnTypeRejected(const QString &className, const QString &typeName,
QString *reason = nullptr) const;
- bool addType(TypeEntry* e, QString *errorMessage = nullptr);
+ bool addType(TypeEntry *e, QString *errorMessage = nullptr);
void addTypeSystemType(const TypeSystemTypeEntry *e);
- FlagsTypeEntry* findFlagsType(const QString& name) const;
- void addFlagsType(FlagsTypeEntry* fte);
+ FlagsTypeEntry *findFlagsType(const QString &name) const;
+ void addFlagsType(FlagsTypeEntry *fte);
- TemplateEntry *findTemplate(const QString& name) const { return m_templates[name]; }
+ TemplateEntry *findTemplate(const QString &name) const { return m_templates[name]; }
- void addTemplate(TemplateEntry* t);
+ void addTemplate(TemplateEntry *t);
AddedFunctionList globalUserFunctions() const { return m_globalUserFunctions; }
void addGlobalUserFunctions(const AddedFunctionList &functions);
- AddedFunctionList findGlobalUserFunctions(const QString& name) const;
+ AddedFunctionList findGlobalUserFunctions(const QString &name) const;
void addGlobalUserFunctionModifications(const FunctionModificationList &functionModifications);
- FunctionModificationList functionModifications(const QString& signature) const;
+ FunctionModificationList functionModifications(const QString &signature) const;
void setSuppressWarnings(bool on) { m_suppressWarnings = on; }
bool addSuppressedWarning(const QString &warning, QString *errorMessage);
- bool isSuppressedWarning(const QString& s) const;
+ bool isSuppressedWarning(const QString &s) const;
static QString globalNamespaceClassName(const TypeEntry *te);
bool parseFile(const QString &filename, bool generate = true);
bool parseFile(const QString &filename, const QString &currentPath, bool generate);
- bool parseFile(QIODevice* device, bool generate = true);
+ bool parseFile(QIODevice *device, bool generate = true);
- static bool setApiVersion(const QString& package, const QString& version);
+ static bool setApiVersion(const QString &package, const QString &version);
static void clearApiVersions();
static bool checkApiVersion(const QString &package, const QVersionNumber &version);
bool hasDroppedTypeEntries() const { return !m_dropTypeEntries.isEmpty(); }
- bool shouldDropTypeEntry(const QString& fullTypeName) const;
+ bool shouldDropTypeEntry(const QString &fullTypeName) const;
void setDropTypeEntries(QStringList dropTypeEntries);