diff options
author | Christian Tismer <tismer@stackless.com> | 2021-02-01 15:59:18 +0100 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2021-02-01 17:28:06 +0000 |
commit | dd2c23e75604403728573c67eaeb5a51ab8280a4 (patch) | |
tree | 62e1be416d3b3457a431cbc6719aa47649484896 /sources/shiboken6/libshiboken/bindingmanager.cpp | |
parent | 70e12d580a64703213ff91c830d62b3852f62906 (diff) |
feature: Fix a flag error when no snake_case is selected
This is another small bug that was found by testing
true_property alone. Some flag refactoring forgot to mask
the flag.
Change-Id: Id3576cf982451b022a8ace72fbaf4369d32b6cb1
Task-number: PYSIDE-1019
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
(cherry picked from commit cdb644bc8fde3086996d4ecaba06f8c34d7666a3)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'sources/shiboken6/libshiboken/bindingmanager.cpp')
-rw-r--r-- | sources/shiboken6/libshiboken/bindingmanager.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sources/shiboken6/libshiboken/bindingmanager.cpp b/sources/shiboken6/libshiboken/bindingmanager.cpp index 3aea677bd..e4c6c2320 100644 --- a/sources/shiboken6/libshiboken/bindingmanager.cpp +++ b/sources/shiboken6/libshiboken/bindingmanager.cpp @@ -298,12 +298,13 @@ PyObject *BindingManager::getOverride(const void *cptr, // They cannot be overridden (make that sure by the metaclass). return nullptr; } - PyObject *pyMethodName = nameCache[(flag & 1) != 0]; // borrowed + bool is_snake = flag & 0x01; + PyObject *pyMethodName = nameCache[is_snake]; // borrowed if (pyMethodName == nullptr) { if (propFlag) methodName += 2; // skip the propFlag and ':' - pyMethodName = Shiboken::String::getSnakeCaseName(methodName, flag); - nameCache[(flag & 1) != 0] = pyMethodName; + pyMethodName = Shiboken::String::getSnakeCaseName(methodName, is_snake); + nameCache[is_snake] = pyMethodName; } if (wrapper->ob_dict) { |