Skip to content

Commit

Permalink
Workaround for messy SHIBOKEN_MICRO_VERSION definition.
Browse files Browse the repository at this point in the history
I recently upgraded to `shiboken2-5.14.2.1`, and this broke preprocessing of
`src/Gui/WidgetFactory.cpp` because `SHIBOKEN_MICRO_VERSION` is now defined as
`2.1` (WTF?!), making it a floating-point literal which the preprocessor does
not like. It is only used for version comparison with `5.12.0`, so replacing
`SHIBOKEN_MICRO_VERSION` with `0` should be OK.
  • Loading branch information
ccorn authored and wwmayer committed Apr 28, 2020
1 parent 227246e commit 299368b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Gui/WidgetFactory.cpp
Expand Up @@ -91,7 +91,8 @@ PyTypeObject** SbkPySide_QtGuiTypes=nullptr;
// 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)

# define SHIBOKEN_FULL_VERSION QT_VERSION_CHECK(SHIBOKEN_MAJOR_VERSION, SHIBOKEN_MINOR_VERSION, SHIBOKEN_MICRO_VERSION)
// 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))
# define HAVE_SHIBOKEN_TYPE_FOR_TYPENAME
# endif
Expand Down

0 comments on commit 299368b

Please sign in to comment.