diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2022-01-24 13:56:05 +0100 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2022-01-24 22:51:06 +0000 |
commit | 85fd2f6d3c2abc0763502c72071f5f548be9405c (patch) | |
tree | 631504ce31ad71b262a4b5e8c7983555762ff6f1 | |
parent | 7d79c67d943d8b97394317a96bd0d7c257566cef (diff) |
shiboken6: Fix broken if statement when setting allow-thread
allow-thread is unrelated to exception handling.
Amends 099f3f46ca9ec1362f211278df4b3e4949b0a339.
As a drive-by, rearrange the allow-thread such that "Unspecified"
is 0.
Task-number: PYSIDE-931
Change-Id: I8cea3e6428ec1feecc358042e54e5a8185ddfbfa
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Tismer <tismer@stackless.com>
(cherry picked from commit 8daf85c871384db7a130415578873e73f3c04d84)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r-- | sources/shiboken6/ApiExtractor/abstractmetabuilder.cpp | 2 | ||||
-rw-r--r-- | sources/shiboken6/ApiExtractor/typesystem_enums.h | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/sources/shiboken6/ApiExtractor/abstractmetabuilder.cpp b/sources/shiboken6/ApiExtractor/abstractmetabuilder.cpp index 5e521b745..f91b05306 100644 --- a/sources/shiboken6/ApiExtractor/abstractmetabuilder.cpp +++ b/sources/shiboken6/ApiExtractor/abstractmetabuilder.cpp @@ -2052,7 +2052,7 @@ AbstractMetaFunction *AbstractMetaBuilderPrivate::traverseFunction(const Functio for (const FunctionModification &mod : functionMods) { if (mod.exceptionHandling() != TypeSystem::ExceptionHandling::Unspecified) metaFunction->setExceptionHandlingModification(mod.exceptionHandling()); - else if (mod.allowThread() != TypeSystem::AllowThread::Unspecified) + if (mod.allowThread() != TypeSystem::AllowThread::Unspecified) metaFunction->setAllowThreadModification(mod.allowThread()); } diff --git a/sources/shiboken6/ApiExtractor/typesystem_enums.h b/sources/shiboken6/ApiExtractor/typesystem_enums.h index d2b719e85..47f7b7cef 100644 --- a/sources/shiboken6/ApiExtractor/typesystem_enums.h +++ b/sources/shiboken6/ApiExtractor/typesystem_enums.h @@ -43,10 +43,10 @@ enum Language { }; enum class AllowThread { + Unspecified, Allow, Disallow, - Auto, - Unspecified + Auto }; enum Ownership { |