diff options
Diffstat (limited to 'sources/shiboken2/ApiExtractor')
9 files changed, 15 insertions, 16 deletions
diff --git a/sources/shiboken2/ApiExtractor/abstractmetabuilder.cpp b/sources/shiboken2/ApiExtractor/abstractmetabuilder.cpp index d3a232546..b1f3fd5fb 100644 --- a/sources/shiboken2/ApiExtractor/abstractmetabuilder.cpp +++ b/sources/shiboken2/ApiExtractor/abstractmetabuilder.cpp @@ -112,8 +112,7 @@ static QStringList parseTemplateType(const QString &name) { } AbstractMetaBuilderPrivate::AbstractMetaBuilderPrivate() : - m_logDirectory(QLatin1String(".") + QDir::separator()), - m_skipDeprecated(false) + m_logDirectory(QLatin1String(".") + QDir::separator()) { } diff --git a/sources/shiboken2/ApiExtractor/abstractmetabuilder_p.h b/sources/shiboken2/ApiExtractor/abstractmetabuilder_p.h index 1fd5f3c34..82488ccba 100644 --- a/sources/shiboken2/ApiExtractor/abstractmetabuilder_p.h +++ b/sources/shiboken2/ApiExtractor/abstractmetabuilder_p.h @@ -190,7 +190,7 @@ public: QFileInfo m_globalHeader; QStringList m_headerPaths; mutable QHash<QString, Include> m_resolveIncludeHash; - bool m_skipDeprecated; + bool m_skipDeprecated = false; }; #endif // ABSTRACTMETBUILDER_P_H diff --git a/sources/shiboken2/ApiExtractor/apiextractor.cpp b/sources/shiboken2/ApiExtractor/apiextractor.cpp index fbe7664e9..44fb70089 100644 --- a/sources/shiboken2/ApiExtractor/apiextractor.cpp +++ b/sources/shiboken2/ApiExtractor/apiextractor.cpp @@ -43,7 +43,7 @@ #include "typedatabase.h" #include "typesystem.h" -ApiExtractor::ApiExtractor() : m_builder(0) +ApiExtractor::ApiExtractor() { // Environment TYPESYSTEMPATH QString envTypesystemPaths = QFile::decodeName(qgetenv("TYPESYSTEMPATH")); diff --git a/sources/shiboken2/ApiExtractor/apiextractor.h b/sources/shiboken2/ApiExtractor/apiextractor.h index 3eb90e748..a5c3fadf3 100644 --- a/sources/shiboken2/ApiExtractor/apiextractor.h +++ b/sources/shiboken2/ApiExtractor/apiextractor.h @@ -97,7 +97,7 @@ private: QString m_typeSystemFileName; QString m_cppFileName; HeaderPaths m_includePaths; - AbstractMetaBuilder* m_builder; + AbstractMetaBuilder* m_builder = nullptr; QString m_logDirectory; LanguageLevel m_languageLevel = LanguageLevel::Default; bool m_skipDeprecated = false; diff --git a/sources/shiboken2/ApiExtractor/clangparser/clangutils.h b/sources/shiboken2/ApiExtractor/clangparser/clangutils.h index db2db6267..2546d5998 100644 --- a/sources/shiboken2/ApiExtractor/clangparser/clangutils.h +++ b/sources/shiboken2/ApiExtractor/clangparser/clangutils.h @@ -82,7 +82,7 @@ SourceRange getCursorRange(const CXCursor &cursor); struct Diagnostic { enum Source { Clang, Other }; - Diagnostic() : source(Clang) {} + Diagnostic() = default; // Clang static Diagnostic fromCXDiagnostic(CXDiagnostic cd); // Other @@ -91,8 +91,8 @@ struct Diagnostic { QString message; QStringList childMessages; SourceLocation location; - Source source; - CXDiagnosticSeverity severity; + Source source = Clang; + CXDiagnosticSeverity severity = CXDiagnostic_Warning; }; QVector<Diagnostic> getDiagnostics(CXTranslationUnit tu); diff --git a/sources/shiboken2/ApiExtractor/include.h b/sources/shiboken2/ApiExtractor/include.h index 4890eea2c..c312dd6cc 100644 --- a/sources/shiboken2/ApiExtractor/include.h +++ b/sources/shiboken2/ApiExtractor/include.h @@ -46,7 +46,7 @@ public: InvalidInclude }; - Include() : m_type(IncludePath) {} + Include() = default; Include(IncludeType t, const QString &nam) : m_type(t), m_name(nam) {}; bool isValid() const @@ -78,7 +78,7 @@ public: friend uint qHash(const Include&); private: - IncludeType m_type; + IncludeType m_type = IncludePath; QString m_name; }; diff --git a/sources/shiboken2/ApiExtractor/typedatabase.cpp b/sources/shiboken2/ApiExtractor/typedatabase.cpp index 930f85d30..6a5e8d8ba 100644 --- a/sources/shiboken2/ApiExtractor/typedatabase.cpp +++ b/sources/shiboken2/ApiExtractor/typedatabase.cpp @@ -56,7 +56,7 @@ typedef QVector<ApiVersion> ApiVersions; Q_GLOBAL_STATIC(ApiVersions, apiVersions) -TypeDatabase::TypeDatabase() : m_suppressWarnings(true) +TypeDatabase::TypeDatabase() { addType(new VoidTypeEntry()); addType(new VarargsTypeEntry()); diff --git a/sources/shiboken2/ApiExtractor/typedatabase.h b/sources/shiboken2/ApiExtractor/typedatabase.h index df614e644..334e88a14 100644 --- a/sources/shiboken2/ApiExtractor/typedatabase.h +++ b/sources/shiboken2/ApiExtractor/typedatabase.h @@ -170,7 +170,7 @@ private: TypeEntryMultiMapConstIteratorRange findTypes(const QString &name) const; TypeEntry *resolveTypeDefEntry(TypedefEntry *typedefEntry, QString *errorMessage); - bool m_suppressWarnings; + bool m_suppressWarnings = true; TypeEntryMultiMap m_entries; TypeEntryMap m_flagsEntries; TypedefEntryMap m_typedefEntries; diff --git a/sources/shiboken2/ApiExtractor/typesystem.h b/sources/shiboken2/ApiExtractor/typesystem.h index 82a698107..d95fad340 100644 --- a/sources/shiboken2/ApiExtractor/typesystem.h +++ b/sources/shiboken2/ApiExtractor/typesystem.h @@ -186,9 +186,9 @@ public: struct ArgumentModification { ArgumentModification() : removedDefaultExpression(false), removed(false), - noNullPointers(false), array(false) {} + noNullPointers(false), resetAfterUse(false), array(false) {} explicit ArgumentModification(int idx) : index(idx), removedDefaultExpression(false), removed(false), - noNullPointers(false), array(false) {} + noNullPointers(false), resetAfterUse(false), array(false) {} // Should the default expression be removed? @@ -1605,7 +1605,7 @@ protected: InterfaceTypeEntry(const InterfaceTypeEntry &); private: - ObjectTypeEntry *m_origin; + ObjectTypeEntry *m_origin = nullptr; }; @@ -1675,7 +1675,7 @@ struct TypeRejection QRegularExpression className; QRegularExpression pattern; - MatchType matchType; + MatchType matchType = Invalid; }; #ifndef QT_NO_DEBUG_STREAM |