From 5446571aec0f16997de054c17b58323b3f527bd6 Mon Sep 17 00:00:00 2001 From: Project579 Date: Sat, 11 Jun 2022 19:23:44 +0200 Subject: [PATCH] Circumvent QT MOC bugs by including the filesystem header in a specific order. --- apps/opencs/model/doc/document.hpp | 1 - apps/opencs/model/doc/documentmanager.hpp | 1 - apps/opencs/model/doc/runner.hpp | 3 ++- apps/opencs/model/doc/saving.hpp | 2 -- apps/opencs/model/tools/tools.hpp | 1 - apps/opencs/model/world/data.hpp | 1 - apps/opencs/view/doc/adjusterwidget.hpp | 3 ++- apps/opencs/view/doc/filedialog.hpp | 1 - apps/opencs/view/doc/newgame.hpp | 4 ++-- components/config/gamesettings.hpp | 4 ++-- 10 files changed, 8 insertions(+), 13 deletions(-) diff --git a/apps/opencs/model/doc/document.hpp b/apps/opencs/model/doc/document.hpp index b88e606d48..a012a7dc5a 100644 --- a/apps/opencs/model/doc/document.hpp +++ b/apps/opencs/model/doc/document.hpp @@ -2,7 +2,6 @@ #define CSM_DOC_DOCUMENT_H #include -#include #include #include diff --git a/apps/opencs/model/doc/documentmanager.hpp b/apps/opencs/model/doc/documentmanager.hpp index 3a69618e74..4dd5c550bb 100644 --- a/apps/opencs/model/doc/documentmanager.hpp +++ b/apps/opencs/model/doc/documentmanager.hpp @@ -3,7 +3,6 @@ #include #include -#include #include #include diff --git a/apps/opencs/model/doc/runner.hpp b/apps/opencs/model/doc/runner.hpp index 526507f1ee..fcc12d2f0e 100644 --- a/apps/opencs/model/doc/runner.hpp +++ b/apps/opencs/model/doc/runner.hpp @@ -3,7 +3,6 @@ #include #include -#include #include #include @@ -11,6 +10,8 @@ #include +#include + class QTemporaryFile; namespace CSMDoc diff --git a/apps/opencs/model/doc/saving.hpp b/apps/opencs/model/doc/saving.hpp index 88d080f0cc..0ec68dd942 100644 --- a/apps/opencs/model/doc/saving.hpp +++ b/apps/opencs/model/doc/saving.hpp @@ -1,8 +1,6 @@ #ifndef CSM_DOC_SAVING_H #define CSM_DOC_SAVING_H -#include - #include #include "operation.hpp" diff --git a/apps/opencs/model/tools/tools.hpp b/apps/opencs/model/tools/tools.hpp index 29ea982f6e..93ab9b174d 100644 --- a/apps/opencs/model/tools/tools.hpp +++ b/apps/opencs/model/tools/tools.hpp @@ -3,7 +3,6 @@ #include #include -#include #include diff --git a/apps/opencs/model/world/data.hpp b/apps/opencs/model/world/data.hpp index 35c6159cfe..2764daa8aa 100644 --- a/apps/opencs/model/world/data.hpp +++ b/apps/opencs/model/world/data.hpp @@ -3,7 +3,6 @@ #include #include -#include #include #include diff --git a/apps/opencs/view/doc/adjusterwidget.hpp b/apps/opencs/view/doc/adjusterwidget.hpp index 1a6f2c477b..7e6330a652 100644 --- a/apps/opencs/view/doc/adjusterwidget.hpp +++ b/apps/opencs/view/doc/adjusterwidget.hpp @@ -1,10 +1,11 @@ #ifndef CSV_DOC_ADJUSTERWIDGET_H #define CSV_DOC_ADJUSTERWIDGET_H -#include #include +#include + class QLabel; namespace CSVDoc diff --git a/apps/opencs/view/doc/filedialog.hpp b/apps/opencs/view/doc/filedialog.hpp index 69ba77b466..4e4113a178 100644 --- a/apps/opencs/view/doc/filedialog.hpp +++ b/apps/opencs/view/doc/filedialog.hpp @@ -6,7 +6,6 @@ #ifndef Q_MOC_RUN -#include #include "adjusterwidget.hpp" #ifndef CS_QT_BOOST_FILESYSTEM_PATH_DECLARED diff --git a/apps/opencs/view/doc/newgame.hpp b/apps/opencs/view/doc/newgame.hpp index afe0f78e33..12b2f3eefe 100644 --- a/apps/opencs/view/doc/newgame.hpp +++ b/apps/opencs/view/doc/newgame.hpp @@ -1,11 +1,11 @@ #ifndef CSV_DOC_NEWGAME_H #define CSV_DOC_NEWGAME_H -#include - #include #include +#include + #ifndef CS_QT_BOOST_FILESYSTEM_PATH_DECLARED #define CS_QT_BOOST_FILESYSTEM_PATH_DECLARED Q_DECLARE_METATYPE (std::filesystem::path) diff --git a/components/config/gamesettings.hpp b/components/config/gamesettings.hpp index 89b958bd47..961af7657b 100644 --- a/components/config/gamesettings.hpp +++ b/components/config/gamesettings.hpp @@ -1,14 +1,14 @@ #ifndef GAMESETTINGS_HPP #define GAMESETTINGS_HPP -#include - #include #include #include #include #include +#include + namespace Files { typedef std::vector PathContainer;