Skip to content

Commit

Permalink
attempt to fix Qt 6.4 build
Browse files Browse the repository at this point in the history
  • Loading branch information
cebtenzzre committed Oct 21, 2024
1 parent 7ed66a6 commit b42b22f
Show file tree
Hide file tree
Showing 14 changed files with 58 additions and 14 deletions.
5 changes: 4 additions & 1 deletion gpt4all-chat/src/chat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,13 @@
#include <QStringList>
#include <QVariant>
#include <Qt>
#include <QtLogging>

#include <utility>

#if QT_VERSION >= QT_VERSION_CHECK(6, 5, 0)
# include <QtLogging>
#endif

Chat::Chat(QObject *parent)
: QObject(parent)
, m_id(Network::globalInstance()->generateUniqueId())
Expand Down
5 changes: 4 additions & 1 deletion gpt4all-chat/src/chatapi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,13 @@
#include <QVariant>
#include <Qt>
#include <QtGlobal>
#include <QtLogging>

#include <iostream>

#if QT_VERSION >= QT_VERSION_CHECK(6, 5, 0)
# include <QtLogging>
#endif

using namespace Qt::Literals::StringLiterals;

//#define DEBUG
Expand Down
5 changes: 4 additions & 1 deletion gpt4all-chat/src/chatlistmodel.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@
#include <QVector>
#include <Qt>
#include <QtGlobal>
#include <QtLogging>

#if QT_VERSION >= QT_VERSION_CHECK(6, 5, 0)
# include <QtLogging>
#endif

class ChatsRestoreThread : public QThread
{
Expand Down
5 changes: 4 additions & 1 deletion gpt4all-chat/src/chatllm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
#include <QUrl>
#include <QWaitCondition>
#include <Qt>
#include <QtLogging>

#include <algorithm>
#include <cctype>
Expand All @@ -37,6 +36,10 @@
#include <utility>
#include <vector>

#if QT_VERSION >= QT_VERSION_CHECK(6, 5, 0)
# include <QtLogging>
#endif

using namespace Qt::Literals::StringLiterals;

//#define DEBUG
Expand Down
5 changes: 4 additions & 1 deletion gpt4all-chat/src/database.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,16 @@
#include <QUtf8StringView>
#include <QVariant>
#include <Qt>
#include <QtLogging>

#include <algorithm>
#include <cmath>
#include <optional>
#include <stdexcept>

#if QT_VERSION >= QT_VERSION_CHECK(6, 5, 0)
# include <QtLogging>
#endif

using namespace Qt::Literals::StringLiterals;
namespace ranges = std::ranges;
namespace us = unum::usearch;
Expand Down
5 changes: 4 additions & 1 deletion gpt4all-chat/src/download.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,16 @@
#include <QVariant>
#include <QVector>
#include <Qt>
#include <QtLogging>

#include <algorithm>
#include <compare>
#include <cstddef>
#include <utility>

#if QT_VERSION >= QT_VERSION_CHECK(6, 5, 0)
# include <QtLogging>
#endif

using namespace Qt::Literals::StringLiterals;

class MyDownload: public Download { };
Expand Down
5 changes: 4 additions & 1 deletion gpt4all-chat/src/embllm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,15 @@
#include <QUrl>
#include <Qt>
#include <QtGlobal>
#include <QtLogging>

#include <exception>
#include <utility>
#include <vector>

#if QT_VERSION >= QT_VERSION_CHECK(6, 5, 0)
# include <QtLogging>
#endif

using namespace Qt::Literals::StringLiterals;

static const QString EMBEDDING_MODEL_NAME = u"nomic-embed-text-v1.5"_s;
Expand Down
5 changes: 4 additions & 1 deletion gpt4all-chat/src/llm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@
#include <QProcess>
#include <QSettings>
#include <QUrl>
#include <QtLogging>

#if QT_VERSION >= QT_VERSION_CHECK(6, 5, 0)
# include <QtLogging>
#endif

#ifdef GPT4ALL_OFFLINE_INSTALLER
# include <QDesktopServices>
Expand Down
6 changes: 5 additions & 1 deletion gpt4all-chat/src/logger.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@

#include <QFile>
#include <QString>
#include <QtLogging>
#include <QtGlobal>

#if QT_VERSION >= QT_VERSION_CHECK(6, 5, 0)
# include <QtLogging>
#endif

class Logger
{
Expand Down
5 changes: 4 additions & 1 deletion gpt4all-chat/src/modellist.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
#include <QTextStream>
#include <QTimer>
#include <QUrl>
#include <QtLogging>

#include <algorithm>
#include <cstddef>
Expand All @@ -41,6 +40,10 @@
#include <string>
#include <utility>

#if QT_VERSION >= QT_VERSION_CHECK(6, 5, 0)
# include <QtLogging>
#endif

using namespace Qt::Literals::StringLiterals;

//#define USE_LOCAL_MODELSJSON
Expand Down
6 changes: 5 additions & 1 deletion gpt4all-chat/src/mysettings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,17 @@
#include <QThread>
#include <QUrl>
#include <QVariant>
#include <QtLogging>
#include <QtGlobal>

#include <algorithm>
#include <string>
#include <thread>
#include <vector>

#if QT_VERSION >= QT_VERSION_CHECK(6, 5, 0)
# include <QtLogging>
#endif

using namespace Qt::Literals::StringLiterals;

// used only for settings serialization, do not translate
Expand Down
5 changes: 4 additions & 1 deletion gpt4all-chat/src/network.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,17 @@
#include <QSysInfo>
#include <Qt>
#include <QtGlobal>
#include <QtLogging>
#include <QUrl>
#include <QUuid>

#include <cmath>
#include <cstring>
#include <utility>

#if QT_VERSION >= QT_VERSION_CHECK(6, 5, 0)
# include <QtLogging>
#endif

#ifdef __GLIBC__
# include <gnu/libc-version.h>
#endif
Expand Down
5 changes: 4 additions & 1 deletion gpt4all-chat/src/server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
#include <Qt>
#include <QtCborCommon>
#include <QtGlobal>
#include <QtLogging>

#include <cstdint>
#include <iostream>
Expand All @@ -37,6 +36,10 @@
#include <unordered_map>
#include <utility>

#if QT_VERSION >= QT_VERSION_CHECK(6, 5, 0)
# include <QtLogging>
#endif

using namespace std::string_literals;
using namespace Qt::Literals::StringLiterals;

Expand Down
5 changes: 4 additions & 1 deletion gpt4all-chat/src/xlsxtomd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,13 @@
#include <QStringView>
#include <QVariant>
#include <QtGlobal>
#include <QtLogging>

#include <memory>

#if QT_VERSION >= QT_VERSION_CHECK(6, 5, 0)
# include <QtLogging>
#endif

using namespace Qt::Literals::StringLiterals;


Expand Down

0 comments on commit b42b22f

Please sign in to comment.