diff --git a/src/Gui/PythonWrapper.cpp b/src/Gui/PythonWrapper.cpp index 41699f71c1..fa4d06a64b 100644 --- a/src/Gui/PythonWrapper.cpp +++ b/src/Gui/PythonWrapper.cpp @@ -79,6 +79,9 @@ // This helps to avoid to include the PySide2 headers since MSVC has a compiler bug when // compiling together with std::bitset (https://bugreports.qt.io/browse/QTBUG-72073) +// Include shiboken first to get the version +# include + // Do not use SHIBOKEN_MICRO_VERSION; it might contain a dot # define SHIBOKEN_FULL_VERSION QT_VERSION_CHECK(SHIBOKEN_MAJOR_VERSION, SHIBOKEN_MINOR_VERSION, 0) # if (SHIBOKEN_FULL_VERSION >= QT_VERSION_CHECK(5, 12, 0)) @@ -340,9 +343,7 @@ getPyTypeObjectForTypeName() #if defined (HAVE_SHIBOKEN_TYPE_FOR_TYPENAME) # if defined (HAVE_SHIBOKEN2) auto sbkType = Shiboken::ObjectType::typeForTypeName(typeid(qttype).name()); - if (sbkType) { - return reinterpret_cast&(sbkType->type); - } + return reinterpret_cast(&sbkType->type); # else return Shiboken::ObjectType::typeForTypeName(typeid(qttype).name()); # endif