diff options
| author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2020-12-21 10:56:33 +0100 |
|---|---|---|
| committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2020-12-22 15:42:25 +0000 |
| commit | 72afb0c30642c9f1d15a6271d25e0bef97a42f3b (patch) | |
| tree | a8f5f76586abe19ed5f30b580e90b06c37b6288d /sources/shiboken6/ApiExtractor/abstractmetabuilder.cpp | |
| parent | 3411d842d01fba831ef8a0d05248d99ad6418080 (diff) | |
shiboken6: Introduce class ApiExtractorResult
Separate the generators from ApiExtractor by introducing
a class ApiExtractorResult storing the results of an ApiExtractor run.
Move some query functions there.
With that, some generator functions can already be made static by
passing the ApiExtractorResult and OverloadData can be decoupled from
the generator.
Change-Id: Iaba3ebff4aecb722eec4a606423738260983d905
Reviewed-by: Christian Tismer <tismer@stackless.com>
(cherry picked from commit b9286bd08a4e7bf8f603e274c80cbd86cb9c1a4a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'sources/shiboken6/ApiExtractor/abstractmetabuilder.cpp')
| -rw-r--r-- | sources/shiboken6/ApiExtractor/abstractmetabuilder.cpp | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/sources/shiboken6/ApiExtractor/abstractmetabuilder.cpp b/sources/shiboken6/ApiExtractor/abstractmetabuilder.cpp index 787094f76..0c679140a 100644 --- a/sources/shiboken6/ApiExtractor/abstractmetabuilder.cpp +++ b/sources/shiboken6/ApiExtractor/abstractmetabuilder.cpp @@ -112,15 +112,9 @@ const AbstractMetaEnumList &AbstractMetaBuilder::globalEnums() const return d->m_globalEnums; } -std::optional<AbstractMetaEnum> - AbstractMetaBuilder::findEnum(const TypeEntry *typeEntry) const +const QHash<const TypeEntry *, AbstractMetaEnum> &AbstractMetaBuilder::typeEntryToEnumsHash() const { - if (typeEntry && typeEntry->isFlags()) - typeEntry = static_cast<const FlagsTypeEntry *>(typeEntry)->originator(); - const auto it = d->m_enums.constFind(typeEntry); - if (it == d->m_enums.constEnd()) - return {}; - return it.value(); + return d->m_enums; } void AbstractMetaBuilderPrivate::checkFunctionModifications() |
