diff options
Diffstat (limited to 'sources/shiboken6/ApiExtractor/typedatabase.h')
-rw-r--r-- | sources/shiboken6/ApiExtractor/typedatabase.h | 30 |
1 files changed, 18 insertions, 12 deletions
diff --git a/sources/shiboken6/ApiExtractor/typedatabase.h b/sources/shiboken6/ApiExtractor/typedatabase.h index 45cd1d2db..d5adca324 100644 --- a/sources/shiboken6/ApiExtractor/typedatabase.h +++ b/sources/shiboken6/ApiExtractor/typedatabase.h @@ -16,6 +16,8 @@ QT_FORWARD_DECLARE_CLASS(QIODevice) +struct OptionDescription; +class OptionsParser; struct TypeDatabasePrivate; struct TypeDatabaseParserContext; @@ -49,7 +51,9 @@ struct TypeRejection QRegularExpression className; QRegularExpression pattern; - MatchType matchType; + MatchType matchType = ExcludeClass; + bool generate; // Current type system + mutable bool matched = false; }; #ifndef QT_NO_DEBUG_STREAM @@ -59,10 +63,14 @@ QDebug operator<<(QDebug d, const TypeRejection &r); class TypeDatabase { TypeDatabase(); - Q_DISABLE_COPY(TypeDatabase) public: + Q_DISABLE_COPY_MOVE(TypeDatabase) + ~TypeDatabase(); + static QList<OptionDescription> options(); + std::shared_ptr<OptionsParser> createOptionsParser(); + /** * Return the type system instance. * \param newInstance This parameter is useful just for unit testing, because singletons causes @@ -77,15 +85,12 @@ public: void addRequiredTargetImport(const QString &moduleName); - void addTypesystemPath(const QString &typesystem_paths); - - void setTypesystemKeywords(const QStringList &keywords); QStringList typesystemKeywords() const; IncludeList extraIncludes(const QString &className) const; - const QStringList &systemIncludes() const; - void addSystemInclude(const QString &name); + const QStringList &forceProcessSystemIncludes() const; + void addForceProcessSystemInclude(const QString &name); void addInlineNamespaceLookups(const NamespaceTypeEntryCPtr &n); @@ -98,6 +103,7 @@ public: FunctionTypeEntryPtr findFunctionType(const QString &name) const; TypeSystemTypeEntryCPtr findTypeSystemType(const QString &name) const; TypeSystemTypeEntryCPtr defaultTypeSystemType() const; + QString loadedTypeSystemNames() const; QString defaultPackageName() const; TypeEntryPtr findType(const QString &name) const; @@ -136,7 +142,7 @@ public: const ComplexTypeEntryCPtr &source); FlagsTypeEntryPtr findFlagsType(const QString &name) const; - void addFlagsType(FlagsTypeEntryPtr fte); + void addFlagsType(const FlagsTypeEntryPtr &fte); TemplateEntryPtr findTemplate(const QString &name) const; @@ -154,9 +160,7 @@ public: FunctionModificationList globalFunctionModifications(const QStringList &signatures) const; - void setSuppressWarnings(bool on); - - bool addSuppressedWarning(const QString &warning, QString *errorMessage); + bool addSuppressedWarning(const QString &warning, bool generate, QString *errorMessage); bool isSuppressedWarning(QStringView s) const; @@ -181,10 +185,12 @@ public: bool shouldDropTypeEntry(const QString &fullTypeName) const; - void setDropTypeEntries(QStringList dropTypeEntries); + void setDropTypeEntries(const QStringList &dropTypeEntries); QString modifiedTypesystemFilepath(const QString &tsFile, const QString ¤tPath = QString()) const; + void logUnmatched() const; + #ifndef QT_NO_DEBUG_STREAM void formatDebug(QDebug &d) const; #endif |