diff --git a/cMake/FreeCAD_Helpers/SetupQt.cmake b/cMake/FreeCAD_Helpers/SetupQt.cmake index c3dc0eeedd..eba599830a 100644 --- a/cMake/FreeCAD_Helpers/SetupQt.cmake +++ b/cMake/FreeCAD_Helpers/SetupQt.cmake @@ -78,6 +78,7 @@ else() endif() configure_file(${CMAKE_SOURCE_DIR}/src/QtCore.h.cmake ${CMAKE_BINARY_DIR}/src/QtCore.h) +configure_file(${CMAKE_SOURCE_DIR}/src/QtWidgets.h.cmake ${CMAKE_BINARY_DIR}/src/QtWidgets.h) function(qt_find_and_add_translation _qm_files _tr_dir _qm_dir) file(GLOB _ts_files ${_tr_dir}) diff --git a/src/Gui/Application.cpp b/src/Gui/Application.cpp index 35a37e9e64..7b99d70022 100644 --- a/src/Gui/Application.cpp +++ b/src/Gui/Application.cpp @@ -137,6 +137,7 @@ #include "WorkbenchManipulator.h" #include "WidgetFactory.h" #include "3Dconnexion/navlib/NavlibInterface.h" +#include "QtWidgets.h" #ifdef BUILD_TRACY_FRAME_PROFILER #include diff --git a/src/Gui/Application.h b/src/Gui/Application.h index 3cece3a157..596fc32dae 100644 --- a/src/Gui/Application.h +++ b/src/Gui/Application.h @@ -30,10 +30,6 @@ #include -#if QT_VERSION >= QT_VERSION_CHECK(6,0,0) && QT_VERSION < QT_VERSION_CHECK(6,8,1) -# define HAS_QTBUG_129596 -#endif - class QCloseEvent; class SoNode; class NavlibInterface; diff --git a/src/Gui/MainWindow.cpp b/src/Gui/MainWindow.cpp index ab2cf7184c..0a76f6dba0 100644 --- a/src/Gui/MainWindow.cpp +++ b/src/Gui/MainWindow.cpp @@ -120,6 +120,7 @@ #include "Dialogs/DlgObjectSelection.h" #include +#include "QtWidgets.h" FC_LOG_LEVEL_INIT("MainWindow",false,true,true) diff --git a/src/QtWidgets.h.cmake b/src/QtWidgets.h.cmake new file mode 100644 index 0000000000..c7d64c59f1 --- /dev/null +++ b/src/QtWidgets.h.cmake @@ -0,0 +1,11 @@ +#ifndef FREECAD_QTWIDGETS_H +#define FREECAD_QTWIDGETS_H + +#include + + +#if QT_VERSION >= QT_VERSION_CHECK(6,0,0) && QT_VERSION < QT_VERSION_CHECK(6,8,1) +# define HAS_QTBUG_129596 +#endif + +#endif // FREECAD_QTWIDGETS_H