From 299368b1b278f94f579c110be179cf6023882ca5 Mon Sep 17 00:00:00 2001 From: Christian Cornelssen Date: Tue, 28 Apr 2020 09:29:01 +0200 Subject: [PATCH] Workaround for messy SHIBOKEN_MICRO_VERSION definition. 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. --- src/Gui/WidgetFactory.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Gui/WidgetFactory.cpp b/src/Gui/WidgetFactory.cpp index 693229b918..c47a76ef42 100644 --- a/src/Gui/WidgetFactory.cpp +++ b/src/Gui/WidgetFactory.cpp @@ -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