diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2020-12-21 17:26:40 +0100 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2020-12-22 15:42:31 +0000 |
commit | c2710a07e01b761c2f6892dc25b9fa83475e8c82 (patch) | |
tree | b405d8e289a1edd4ff86cf98fe92d0fe32655bf4 /sources/shiboken6/generator/shiboken/headergenerator.cpp | |
parent | 72afb0c30642c9f1d15a6271d25e0bef97a42f3b (diff) |
shiboken6/ApiExtractorResult: Use const AbstractMetaClass * for the class list
Add the missing overloads of AbstractMetaClass::findClass()
and adapt some types.
Change-Id: I65851248b4b6a2e1d4f57fc58ecaf75fb4c00b29
Reviewed-by: Christian Tismer <tismer@stackless.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
(cherry picked from commit 6d25758babd8ccad4fbc7effe561c29cbd692434)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'sources/shiboken6/generator/shiboken/headergenerator.cpp')
-rw-r--r-- | sources/shiboken6/generator/shiboken/headergenerator.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sources/shiboken6/generator/shiboken/headergenerator.cpp b/sources/shiboken6/generator/shiboken/headergenerator.cpp index fb7e36524..b7719f803 100644 --- a/sources/shiboken6/generator/shiboken/headergenerator.cpp +++ b/sources/shiboken6/generator/shiboken/headergenerator.cpp @@ -396,9 +396,9 @@ bool HeaderGenerator::finishGeneration() } macrosStream << "// Type indices\nenum : int {\n"; - AbstractMetaClassList classList = api().classes(); + AbstractMetaClassCList classList = api().classes(); - std::sort(classList.begin(), classList.end(), [](AbstractMetaClass *a, AbstractMetaClass *b) { + std::sort(classList.begin(), classList.end(), [](const AbstractMetaClass *a, const AbstractMetaClass *b) { return a->typeEntry()->sbkIndex() < b->typeEntry()->sbkIndex(); }); @@ -489,7 +489,7 @@ bool HeaderGenerator::finishGeneration() } StringStream protEnumsSurrogates(TextStream::Language::Cpp); - for (AbstractMetaClass *metaClass : classList) { + for (auto metaClass : classList) { if (!shouldGenerate(metaClass)) continue; |