diff --git a/gpt4all-chat/src/chat.cpp b/gpt4all-chat/src/chat.cpp index 6b9c8898624f5..2c573b765676c 100644 --- a/gpt4all-chat/src/chat.cpp +++ b/gpt4all-chat/src/chat.cpp @@ -14,10 +14,13 @@ #include #include #include -#include #include +#if QT_VERSION >= QT_VERSION_CHECK(6, 5, 0) +# include +#endif + Chat::Chat(QObject *parent) : QObject(parent) , m_id(Network::globalInstance()->generateUniqueId()) diff --git a/gpt4all-chat/src/chatapi.cpp b/gpt4all-chat/src/chatapi.cpp index e8bcca709a93d..238afb21b6ee1 100644 --- a/gpt4all-chat/src/chatapi.cpp +++ b/gpt4all-chat/src/chatapi.cpp @@ -16,10 +16,13 @@ #include #include #include -#include #include +#if QT_VERSION >= QT_VERSION_CHECK(6, 5, 0) +# include +#endif + using namespace Qt::Literals::StringLiterals; //#define DEBUG diff --git a/gpt4all-chat/src/chatlistmodel.h b/gpt4all-chat/src/chatlistmodel.h index a30efd5aff32f..403f97b77501d 100644 --- a/gpt4all-chat/src/chatlistmodel.h +++ b/gpt4all-chat/src/chatlistmodel.h @@ -16,7 +16,10 @@ #include #include #include -#include + +#if QT_VERSION >= QT_VERSION_CHECK(6, 5, 0) +# include +#endif class ChatsRestoreThread : public QThread { diff --git a/gpt4all-chat/src/chatllm.cpp b/gpt4all-chat/src/chatllm.cpp index e693c03b60d11..20823cee16170 100644 --- a/gpt4all-chat/src/chatllm.cpp +++ b/gpt4all-chat/src/chatllm.cpp @@ -24,7 +24,6 @@ #include #include #include -#include #include #include @@ -37,6 +36,10 @@ #include #include +#if QT_VERSION >= QT_VERSION_CHECK(6, 5, 0) +# include +#endif + using namespace Qt::Literals::StringLiterals; //#define DEBUG diff --git a/gpt4all-chat/src/database.cpp b/gpt4all-chat/src/database.cpp index 1b86caace5e71..46cfe721d1ef5 100644 --- a/gpt4all-chat/src/database.cpp +++ b/gpt4all-chat/src/database.cpp @@ -24,13 +24,16 @@ #include #include #include -#include #include #include #include #include +#if QT_VERSION >= QT_VERSION_CHECK(6, 5, 0) +# include +#endif + using namespace Qt::Literals::StringLiterals; namespace ranges = std::ranges; namespace us = unum::usearch; diff --git a/gpt4all-chat/src/download.cpp b/gpt4all-chat/src/download.cpp index 0f5b7b5dd570a..80afb211ad35b 100644 --- a/gpt4all-chat/src/download.cpp +++ b/gpt4all-chat/src/download.cpp @@ -27,13 +27,16 @@ #include #include #include -#include #include #include #include #include +#if QT_VERSION >= QT_VERSION_CHECK(6, 5, 0) +# include +#endif + using namespace Qt::Literals::StringLiterals; class MyDownload: public Download { }; diff --git a/gpt4all-chat/src/embllm.cpp b/gpt4all-chat/src/embllm.cpp index 81b1e9e1da784..4e09a64a55fa3 100644 --- a/gpt4all-chat/src/embllm.cpp +++ b/gpt4all-chat/src/embllm.cpp @@ -22,12 +22,15 @@ #include #include #include -#include #include #include #include +#if QT_VERSION >= QT_VERSION_CHECK(6, 5, 0) +# include +#endif + using namespace Qt::Literals::StringLiterals; static const QString EMBEDDING_MODEL_NAME = u"nomic-embed-text-v1.5"_s; diff --git a/gpt4all-chat/src/llm.cpp b/gpt4all-chat/src/llm.cpp index aed1a7db73016..8727b13821106 100644 --- a/gpt4all-chat/src/llm.cpp +++ b/gpt4all-chat/src/llm.cpp @@ -11,7 +11,10 @@ #include #include #include -#include + +#if QT_VERSION >= QT_VERSION_CHECK(6, 5, 0) +# include +#endif #ifdef GPT4ALL_OFFLINE_INSTALLER # include diff --git a/gpt4all-chat/src/logger.h b/gpt4all-chat/src/logger.h index 5ca865c0a6d08..5a36d559faf83 100644 --- a/gpt4all-chat/src/logger.h +++ b/gpt4all-chat/src/logger.h @@ -3,7 +3,11 @@ #include #include -#include +#include + +#if QT_VERSION >= QT_VERSION_CHECK(6, 5, 0) +# include +#endif class Logger { diff --git a/gpt4all-chat/src/modellist.cpp b/gpt4all-chat/src/modellist.cpp index 7cd36094a3e7b..67c34f4d8ebda 100644 --- a/gpt4all-chat/src/modellist.cpp +++ b/gpt4all-chat/src/modellist.cpp @@ -32,7 +32,6 @@ #include #include #include -#include #include #include @@ -41,6 +40,10 @@ #include #include +#if QT_VERSION >= QT_VERSION_CHECK(6, 5, 0) +# include +#endif + using namespace Qt::Literals::StringLiterals; //#define USE_LOCAL_MODELSJSON diff --git a/gpt4all-chat/src/mysettings.cpp b/gpt4all-chat/src/mysettings.cpp index 38c8ab6821f59..909a17aa234c7 100644 --- a/gpt4all-chat/src/mysettings.cpp +++ b/gpt4all-chat/src/mysettings.cpp @@ -15,13 +15,17 @@ #include #include #include -#include +#include #include #include #include #include +#if QT_VERSION >= QT_VERSION_CHECK(6, 5, 0) +# include +#endif + using namespace Qt::Literals::StringLiterals; // used only for settings serialization, do not translate diff --git a/gpt4all-chat/src/network.cpp b/gpt4all-chat/src/network.cpp index 2e794d1ab2419..fa4d2a2f80f9f 100644 --- a/gpt4all-chat/src/network.cpp +++ b/gpt4all-chat/src/network.cpp @@ -29,7 +29,6 @@ #include #include #include -#include #include #include @@ -37,6 +36,10 @@ #include #include +#if QT_VERSION >= QT_VERSION_CHECK(6, 5, 0) +# include +#endif + #ifdef __GLIBC__ # include #endif diff --git a/gpt4all-chat/src/server.cpp b/gpt4all-chat/src/server.cpp index b02d59d47ddc1..dcdb1fd58b620 100644 --- a/gpt4all-chat/src/server.cpp +++ b/gpt4all-chat/src/server.cpp @@ -26,7 +26,6 @@ #include #include #include -#include #include #include @@ -37,6 +36,10 @@ #include #include +#if QT_VERSION >= QT_VERSION_CHECK(6, 5, 0) +# include +#endif + using namespace std::string_literals; using namespace Qt::Literals::StringLiterals; diff --git a/gpt4all-chat/src/xlsxtomd.cpp b/gpt4all-chat/src/xlsxtomd.cpp index 4f25e2e7b411f..8728152186719 100644 --- a/gpt4all-chat/src/xlsxtomd.cpp +++ b/gpt4all-chat/src/xlsxtomd.cpp @@ -16,10 +16,13 @@ #include #include #include -#include #include +#if QT_VERSION >= QT_VERSION_CHECK(6, 5, 0) +# include +#endif + using namespace Qt::Literals::StringLiterals;