Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F112571
D44.1732336441.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Size
41 KB
Referenced Files
None
Subscribers
None
D44.1732336441.diff
View Options
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -8,6 +8,7 @@
configure_file(kazv-path-config.hpp.in kazv-path-config.hpp)
configure_file(kazv-version.cpp.in kazv-version.cpp)
configure_file(kazv-platform.hpp.in kazv-platform.hpp)
+configure_file(kazv-defs.hpp.in kazv-defs.hpp)
set(kazvprivlib_SRCS
qt-job-handler.cpp
diff --git a/src/device-mgmt/matrix-device-list.hpp b/src/device-mgmt/matrix-device-list.hpp
--- a/src/device-mgmt/matrix-device-list.hpp
+++ b/src/device-mgmt/matrix-device-list.hpp
@@ -5,8 +5,7 @@
*/
#pragma once
-#include <libkazv-config.hpp>
-#include <immer/config.hpp> // https://github.com/arximboldi/immer/issues/168
+#include <kazv-defs.hpp>
#include <QObject>
#include <QQmlEngine>
@@ -15,6 +14,7 @@
#include <lager/extra/qt.hpp>
#include <client.hpp>
+Q_MOC_INCLUDE("matrix-device.hpp")
class MatrixDevice;
diff --git a/src/device-mgmt/matrix-device-list.cpp b/src/device-mgmt/matrix-device-list.cpp
--- a/src/device-mgmt/matrix-device-list.cpp
+++ b/src/device-mgmt/matrix-device-list.cpp
@@ -4,8 +4,7 @@
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
-#include <libkazv-config.hpp>
-#include <immer/config.hpp> // https://github.com/arximboldi/immer/issues/168
+#include <kazv-defs.hpp>
#include <lager/lenses/optional.hpp>
diff --git a/src/device-mgmt/matrix-device.hpp b/src/device-mgmt/matrix-device.hpp
--- a/src/device-mgmt/matrix-device.hpp
+++ b/src/device-mgmt/matrix-device.hpp
@@ -5,8 +5,7 @@
*/
#pragma once
-#include <libkazv-config.hpp>
-#include <immer/config.hpp> // https://github.com/arximboldi/immer/issues/168
+#include <kazv-defs.hpp>
#include <QObject>
#include <QQmlEngine>
diff --git a/src/device-mgmt/matrix-device.cpp b/src/device-mgmt/matrix-device.cpp
--- a/src/device-mgmt/matrix-device.cpp
+++ b/src/device-mgmt/matrix-device.cpp
@@ -4,8 +4,7 @@
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
-#include <libkazv-config.hpp>
-#include <immer/config.hpp> // https://github.com/arximboldi/immer/issues/168
+#include <kazv-defs.hpp>
#include <lager/lenses/optional.hpp>
diff --git a/src/helper.hpp b/src/helper.hpp
--- a/src/helper.hpp
+++ b/src/helper.hpp
@@ -6,9 +6,7 @@
#pragma once
-#include <libkazv-config.hpp>
-
-#include <immer/config.hpp> // https://github.com/arximboldi/immer/issues/168
+#include <kazv-defs.hpp>
#include <immer/array.hpp>
#include <QString>
diff --git a/src/helper.cpp b/src/helper.cpp
--- a/src/helper.cpp
+++ b/src/helper.cpp
@@ -1,11 +1,10 @@
/*
* This file is part of kazv.
- * SPDX-FileCopyrightText: 2020 Tusooa Zhu <tusooa@kazv.moe>
+ * SPDX-FileCopyrightText: 2020-2024 tusooa <tusooa@kazv.moe>
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
-#include <libkazv-config.hpp>
-#include <immer/config.hpp> // https://github.com/arximboldi/immer/issues/168
+#include <kazv-defs.hpp>
#include "kazv-log.hpp"
diff --git a/src/kazv-config.hpp b/src/kazv-config.hpp
--- a/src/kazv-config.hpp
+++ b/src/kazv-config.hpp
@@ -5,7 +5,7 @@
*/
#pragma once
-#include <libkazv-config.hpp>
+#include <kazv-defs.hpp>
#include <QObject>
#include <QQmlEngine>
diff --git a/src/kazv-config.cpp b/src/kazv-config.cpp
--- a/src/kazv-config.cpp
+++ b/src/kazv-config.cpp
@@ -1,9 +1,10 @@
/*
* This file is part of kazv.
- * SPDX-FileCopyrightText: 2021 Tusooa Zhu <tusooa@kazv.moe>
+ * SPDX-FileCopyrightText: 2021-2024 tusooa <tusooa@kazv.moe>
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
+#include <kazv-defs.hpp>
#include "kazv-config.hpp"
#include <KSharedConfig>
diff --git a/src/tests/test-utils.hpp b/src/kazv-defs.hpp.in
copy from src/tests/test-utils.hpp
copy to src/kazv-defs.hpp.in
--- a/src/tests/test-utils.hpp
+++ b/src/kazv-defs.hpp.in
@@ -1,18 +1,15 @@
/*
* This file is part of kazv.
- * SPDX-FileCopyrightText: 2023 tusooa <tusooa@kazv.moe>
+ * SPDX-FileCopyrightText: 2024 tusooa <tusooa@kazv.moe>
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
#pragma once
-
#include <libkazv-config.hpp>
#include <immer/config.hpp> // https://github.com/arximboldi/immer/issues/168
-#include <memory>
+#define KAZV_KF_QT_MAJOR_VERSION ${kazv_KF_QT_MAJOR_VERSION}
-template<class T>
-auto toUniquePtr(T *ptr)
-{
- return std::unique_ptr<T>(ptr);
-}
+#if KAZV_KF_QT_MAJOR_VERSION == 5
+#define Q_MOC_INCLUDE(...)
+#endif
diff --git a/src/kazv-file.hpp b/src/kazv-file.hpp
--- a/src/kazv-file.hpp
+++ b/src/kazv-file.hpp
@@ -5,6 +5,7 @@
*/
#pragma once
+#include <kazv-defs.hpp>
#include <aes-256-ctr.hpp>
#include <QObject>
diff --git a/src/kazv-file.cpp b/src/kazv-file.cpp
--- a/src/kazv-file.cpp
+++ b/src/kazv-file.cpp
@@ -1,3 +1,11 @@
+/*
+ * This file is part of kazv.
+ * SPDX-FileCopyrightText: 2020-2024 nannanko <nannanko@kazv.moe>
+ * SPDX-FileCopyrightText: 2024 tusooa <tusooa@kazv.moe>
+ * SPDX-License-Identifier: AGPL-3.0-or-later
+ */
+
+#include <kazv-defs.hpp>
#include "kazv-file.hpp"
#include <QCryptographicHash>
diff --git a/src/kazv-io-job.hpp b/src/kazv-io-job.hpp
--- a/src/kazv-io-job.hpp
+++ b/src/kazv-io-job.hpp
@@ -5,6 +5,7 @@
*/
#pragma once
+#include <kazv-defs.hpp>
#include "matrix-room.hpp"
#include "matrix-room-list.hpp"
#include "kazv-file.hpp"
diff --git a/src/kazv-io-job.cpp b/src/kazv-io-job.cpp
--- a/src/kazv-io-job.cpp
+++ b/src/kazv-io-job.cpp
@@ -3,6 +3,8 @@
* SPDX-FileCopyrightText: 2022-2023 nannanko <nannanko@kazv.moe>
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
+
+#include <kazv-defs.hpp>
#include "kazv-io-job.hpp"
#include "matrix-room.hpp"
diff --git a/src/kazv-io-manager.hpp b/src/kazv-io-manager.hpp
--- a/src/kazv-io-manager.hpp
+++ b/src/kazv-io-manager.hpp
@@ -5,6 +5,7 @@
*/
#pragma once
+#include <kazv-defs.hpp>
#include "kazv-io-job.hpp"
#include "matrix-room.hpp"
#include "upload-job-model.hpp"
diff --git a/src/kazv-io-manager.cpp b/src/kazv-io-manager.cpp
--- a/src/kazv-io-manager.cpp
+++ b/src/kazv-io-manager.cpp
@@ -4,6 +4,7 @@
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
+#include <kazv-defs.hpp>
#include "kazv-io-manager.hpp"
#include "kazv-io-job.hpp"
#include "matrix-room.hpp"
diff --git a/src/kazv-markdown.hpp b/src/kazv-markdown.hpp
--- a/src/kazv-markdown.hpp
+++ b/src/kazv-markdown.hpp
@@ -4,8 +4,7 @@
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
-#include <libkazv-config.hpp>
-#include <immer/config.hpp> // https://github.com/arximboldi/immer/issues/168
+#include <kazv-defs.hpp>
#include <string>
diff --git a/src/kazv-markdown.cpp b/src/kazv-markdown.cpp
--- a/src/kazv-markdown.cpp
+++ b/src/kazv-markdown.cpp
@@ -4,8 +4,7 @@
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
-#include <libkazv-config.hpp>
-#include <immer/config.hpp> // https://github.com/arximboldi/immer/issues/168
+#include <kazv-defs.hpp>
#include <unordered_set>
diff --git a/src/kazv-path-config.hpp.in b/src/kazv-path-config.hpp.in
--- a/src/kazv-path-config.hpp.in
+++ b/src/kazv-path-config.hpp.in
@@ -1,25 +1,12 @@
/*
- * Copyright (C) 2021 Tusooa Zhu <tusooa@kazv.moe>
- *
* This file is part of kazv.
- *
- * kazv is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * kazv is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with kazv. If not, see <https://www.gnu.org/licenses/>.
+ * SPDX-FileCopyrightText: 2021-2024 tusooa <tusooa@kazv.moe>
+ * SPDX-License-Identifier: AGPL-3.0-or-later
*/
#pragma once
-#include <libkazv-config.hpp>
+#include <kazv-defs.hpp>
#include <QString>
#include <QCoreApplication>
diff --git a/src/kazv-platform.hpp.in b/src/kazv-platform.hpp.in
--- a/src/kazv-platform.hpp.in
+++ b/src/kazv-platform.hpp.in
@@ -6,6 +6,6 @@
#pragma once
-#include <libkazv-config.hpp>
+#include <kazv-defs.hpp>
#define KAZV_IS_WINDOWS ${KAZV_IS_WINDOWS}
diff --git a/src/kazv-util.hpp b/src/kazv-util.hpp
--- a/src/kazv-util.hpp
+++ b/src/kazv-util.hpp
@@ -5,14 +5,17 @@
*/
#pragma once
-#include <libkazv-config.hpp>
+#include <kazv-defs.hpp>
#include <QObject>
#include <QString>
+#include <QQmlEngine>
class KazvUtil : public QObject
{
Q_OBJECT
+ QML_ELEMENT
+ QML_SINGLETON
public:
KazvUtil(QObject *parent = 0);
diff --git a/src/kazv-util.cpp b/src/kazv-util.cpp
--- a/src/kazv-util.cpp
+++ b/src/kazv-util.cpp
@@ -4,8 +4,7 @@
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
-#include <libkazv-config.hpp>
-#include <immer/config.hpp>
+#include <kazv-defs.hpp>
#include <QUrl>
#include <QMimeDatabase>
diff --git a/src/kazv-version.hpp b/src/kazv-version.hpp
--- a/src/kazv-version.hpp
+++ b/src/kazv-version.hpp
@@ -1,11 +1,11 @@
/*
* This file is part of kazv.
- * SPDX-FileCopyrightText: 2021 Tusooa Zhu <tusooa@kazv.moe>
+ * SPDX-FileCopyrightText: 2021-2024 tusooa <tusooa@kazv.moe>
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
#pragma once
-#include <libkazv-config.hpp>
+#include <kazv-defs.hpp>
#include <string>
diff --git a/src/kazv-version.cpp.in b/src/kazv-version.cpp.in
--- a/src/kazv-version.cpp.in
+++ b/src/kazv-version.cpp.in
@@ -1,22 +1,10 @@
/*
- * Copyright (C) 2021 Tusooa Zhu <tusooa@kazv.moe>
- *
* This file is part of kazv.
- *
- * kazv is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * kazv is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with kazv. If not, see <https://www.gnu.org/licenses/>.
+ * SPDX-FileCopyrightText: 2021-2024 tusooa <tusooa@kazv.moe>
+ * SPDX-License-Identifier: AGPL-3.0-or-later
*/
+#include <kazv-defs.hpp>
#include "kazv-version.hpp"
std::string kazvVersionString()
diff --git a/src/l10n-provider.hpp b/src/l10n-provider.hpp
--- a/src/l10n-provider.hpp
+++ b/src/l10n-provider.hpp
@@ -1,11 +1,11 @@
/*
* This file is part of kazv.
- * SPDX-FileCopyrightText: 2021 Tusooa Zhu <tusooa@kazv.moe>
+ * SPDX-FileCopyrightText: 2021-2024 tusooa <tusooa@kazv.moe>
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
#pragma once
-#include <libkazv-config.hpp>
+#include <kazv-defs.hpp>
#include <QObject>
#include <QQmlEngine>
diff --git a/src/l10n-provider.cpp b/src/l10n-provider.cpp
--- a/src/l10n-provider.cpp
+++ b/src/l10n-provider.cpp
@@ -1,9 +1,10 @@
/*
* This file is part of kazv.
- * SPDX-FileCopyrightText: 2021 Tusooa Zhu <tusooa@kazv.moe>
+ * SPDX-FileCopyrightText: 2021-2024 tusooa <tusooa@kazv.moe>
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
+#include <kazv-defs.hpp>
#include "l10n-provider.hpp"
#include <optional>
@@ -34,7 +35,11 @@
throw std::runtime_error("Cannot open " + path.toStdString() + " for reading.");
}
QTextStream stream(&f);
+#if KAZV_KF_QT_MAJOR_VERSION == 5
stream.setCodec("UTF-8");
+#else
+ stream.setEncoding(QStringConverter::Utf8);
+#endif
return stream.readAll();
}
diff --git a/src/main.cpp b/src/main.cpp
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -3,7 +3,8 @@
* SPDX-FileCopyrightText: 2021-2023 tusooa <tusooa@kazv.moe>
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
-#include <libkazv-config.hpp>
+
+#include <kazv-defs.hpp>
#include <immer/config.hpp> // https://github.com/arximboldi/immer/issues/168
diff --git a/src/matrix-event-reader-list-model.hpp b/src/matrix-event-reader-list-model.hpp
--- a/src/matrix-event-reader-list-model.hpp
+++ b/src/matrix-event-reader-list-model.hpp
@@ -5,11 +5,10 @@
*/
#pragma once
-#include <libkazv-config.hpp>
-
-#include <immer/config.hpp> // https://github.com/arximboldi/immer/issues/168
+#include <kazv-defs.hpp>
#include "matrix-room-member-list-model.hpp"
+Q_MOC_INCLUDE("matrix-event-reader.hpp")
class MatrixEventReader;
diff --git a/src/matrix-event-reader-list-model.cpp b/src/matrix-event-reader-list-model.cpp
--- a/src/matrix-event-reader-list-model.cpp
+++ b/src/matrix-event-reader-list-model.cpp
@@ -4,8 +4,7 @@
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
-#include <libkazv-config.hpp>
-#include <immer/config.hpp> // https://github.com/arximboldi/immer/issues/168
+#include <kazv-defs.hpp>
#include "matrix-event-reader-list-model.hpp"
#include "matrix-event-reader.hpp"
diff --git a/src/matrix-event-reader.hpp b/src/matrix-event-reader.hpp
--- a/src/matrix-event-reader.hpp
+++ b/src/matrix-event-reader.hpp
@@ -5,9 +5,7 @@
*/
#pragma once
-#include <libkazv-config.hpp>
-
-#include <immer/config.hpp> // https://github.com/arximboldi/immer/issues/168
+#include <kazv-defs.hpp>
#include "matrix-room-member.hpp"
diff --git a/src/matrix-event-reader.cpp b/src/matrix-event-reader.cpp
--- a/src/matrix-event-reader.cpp
+++ b/src/matrix-event-reader.cpp
@@ -4,8 +4,7 @@
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
-#include <libkazv-config.hpp>
-#include <immer/config.hpp> // https://github.com/arximboldi/immer/issues/168
+#include <kazv-defs.hpp>
#include <QDateTime>
diff --git a/src/matrix-event.hpp b/src/matrix-event.hpp
--- a/src/matrix-event.hpp
+++ b/src/matrix-event.hpp
@@ -5,9 +5,7 @@
*/
#pragma once
-#include <libkazv-config.hpp>
-
-#include <immer/config.hpp> // https://github.com/arximboldi/immer/issues/168
+#include <kazv-defs.hpp>
#include <QObject>
#include <QQmlEngine>
@@ -17,6 +15,7 @@
#include <client/room/room.hpp>
#include "qt-json.hpp"
+Q_MOC_INCLUDE("matrix-event-reader-list-model.hpp")
class MatrixEventReaderListModel;
diff --git a/src/matrix-event.cpp b/src/matrix-event.cpp
--- a/src/matrix-event.cpp
+++ b/src/matrix-event.cpp
@@ -3,9 +3,8 @@
* SPDX-FileCopyrightText: 2020-2023 tusooa <tusooa@kazv.moe>
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
-#include <libkazv-config.hpp>
-#include <immer/config.hpp> // https://github.com/arximboldi/immer/issues/168
+#include <kazv-defs.hpp>
#include "matrix-event.hpp"
#include "matrix-event-reader-list-model.hpp"
diff --git a/src/matrix-link.hpp b/src/matrix-link.hpp
--- a/src/matrix-link.hpp
+++ b/src/matrix-link.hpp
@@ -5,9 +5,7 @@
*/
#pragma once
-#include <libkazv-config.hpp>
-
-#include <immer/config.hpp> // https://github.com/arximboldi/immer/issues/168
+#include <kazv-defs.hpp>
#include <tuple>
#include <vector>
diff --git a/src/matrix-link.cpp b/src/matrix-link.cpp
--- a/src/matrix-link.cpp
+++ b/src/matrix-link.cpp
@@ -4,9 +4,7 @@
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
-#include <libkazv-config.hpp>
-
-#include <immer/config.hpp> // https://github.com/arximboldi/immer/issues/168
+#include <kazv-defs.hpp>
#include <QUrl>
#include <QUrlQuery>
diff --git a/src/matrix-promise.hpp b/src/matrix-promise.hpp
--- a/src/matrix-promise.hpp
+++ b/src/matrix-promise.hpp
@@ -5,8 +5,7 @@
*/
#pragma once
-#include <libkazv-config.hpp>
-#include <immer/config.hpp> // https://github.com/arximboldi/immer/issues/168
+#include <kazv-defs.hpp>
#include <memory>
@@ -15,8 +14,11 @@
#include <promise-interface.hpp>
#include <sdk.hpp>
+Q_MOC_INCLUDE(<QJsonValue>)
+Q_MOC_INCLUDE(<QJSValue>)
class QJsonValue;
+class QJSValue;
class MatrixPromise : public QObject
{
@@ -27,6 +29,9 @@
explicit MatrixPromise(QObject *parent = 0);
public:
explicit MatrixPromise(Kazv::SingleTypePromise<Kazv::EffectStatus> promise, QObject *parent = 0);
+#if KAZV_KF_QT_MAJOR_VERSION == 6
+ MatrixPromise(const QJSValue &) = delete;
+#endif
~MatrixPromise();
static MatrixPromise *createResolved(bool isSuccess, const QJsonValue &data, QObject *parent = 0);
diff --git a/src/matrix-promise.cpp b/src/matrix-promise.cpp
--- a/src/matrix-promise.cpp
+++ b/src/matrix-promise.cpp
@@ -4,8 +4,7 @@
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
-#include <libkazv-config.hpp>
-#include <immer/config.hpp> // https://github.com/arximboldi/immer/issues/168
+#include <kazv-defs.hpp>
#include <QTimer>
diff --git a/src/matrix-room-list.hpp b/src/matrix-room-list.hpp
--- a/src/matrix-room-list.hpp
+++ b/src/matrix-room-list.hpp
@@ -5,9 +5,7 @@
*/
#pragma once
-#include <libkazv-config.hpp>
-
-#include <immer/config.hpp> // https://github.com/arximboldi/immer/issues/168
+#include <kazv-defs.hpp>
#include <QObject>
#include <QQmlEngine>
diff --git a/src/matrix-room-list.cpp b/src/matrix-room-list.cpp
--- a/src/matrix-room-list.cpp
+++ b/src/matrix-room-list.cpp
@@ -3,9 +3,8 @@
* SPDX-FileCopyrightText: 2020 Tusooa Zhu <tusooa@kazv.moe>
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
-#include <libkazv-config.hpp>
-#include <immer/config.hpp> // https://github.com/arximboldi/immer/issues/168
+#include <kazv-defs.hpp>
#include <zug/into_vector.hpp>
#include <lager/commit.hpp>
diff --git a/src/matrix-room-member-list-model.hpp b/src/matrix-room-member-list-model.hpp
--- a/src/matrix-room-member-list-model.hpp
+++ b/src/matrix-room-member-list-model.hpp
@@ -5,9 +5,7 @@
*/
#pragma once
-#include <libkazv-config.hpp>
-
-#include <immer/config.hpp> // https://github.com/arximboldi/immer/issues/168
+#include <kazv-defs.hpp>
#include <QObject>
#include <QQmlEngine>
diff --git a/src/matrix-room-member-list-model.cpp b/src/matrix-room-member-list-model.cpp
--- a/src/matrix-room-member-list-model.cpp
+++ b/src/matrix-room-member-list-model.cpp
@@ -3,9 +3,8 @@
* SPDX-FileCopyrightText: 2020-2023 tusooa <tusooa@kazv.moe>
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
-#include <libkazv-config.hpp>
-#include <immer/config.hpp> // https://github.com/arximboldi/immer/issues/168
+#include <kazv-defs.hpp>
#include <cmath>
diff --git a/src/matrix-room-member.hpp b/src/matrix-room-member.hpp
--- a/src/matrix-room-member.hpp
+++ b/src/matrix-room-member.hpp
@@ -1,13 +1,11 @@
/*
* This file is part of kazv.
- * SPDX-FileCopyrightText: 2020 Tusooa Zhu <tusooa@kazv.moe>
+ * SPDX-FileCopyrightText: 2020-2024 tusooa <tusooa@kazv.moe>
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
#pragma once
-#include <libkazv-config.hpp>
-
-#include <immer/config.hpp> // https://github.com/arximboldi/immer/issues/168
+#include <kazv-defs.hpp>
#include <QObject>
#include <QQmlEngine>
diff --git a/src/matrix-room-member.cpp b/src/matrix-room-member.cpp
--- a/src/matrix-room-member.cpp
+++ b/src/matrix-room-member.cpp
@@ -3,7 +3,8 @@
* SPDX-FileCopyrightText: 2020-2023 tusooa <tusooa@kazv.moe>
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
-#include <libkazv-config.hpp>
+
+#include <kazv-defs.hpp>
#include <cursorutil.hpp>
diff --git a/src/matrix-room-timeline.hpp b/src/matrix-room-timeline.hpp
--- a/src/matrix-room-timeline.hpp
+++ b/src/matrix-room-timeline.hpp
@@ -5,9 +5,7 @@
*/
#pragma once
-#include <libkazv-config.hpp>
-
-#include <immer/config.hpp> // https://github.com/arximboldi/immer/issues/168
+#include <kazv-defs.hpp>
#include <QObject>
#include <QQmlEngine>
diff --git a/src/matrix-room-timeline.cpp b/src/matrix-room-timeline.cpp
--- a/src/matrix-room-timeline.cpp
+++ b/src/matrix-room-timeline.cpp
@@ -3,9 +3,8 @@
* SPDX-FileCopyrightText: 2020-2023 tusooa <tusooa@kazv.moe>
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
-#include <libkazv-config.hpp>
-#include <immer/config.hpp> // https://github.com/arximboldi/immer/issues/168
+#include <kazv-defs.hpp>
#include <cmath>
diff --git a/src/matrix-room.hpp b/src/matrix-room.hpp
--- a/src/matrix-room.hpp
+++ b/src/matrix-room.hpp
@@ -5,9 +5,7 @@
*/
#pragma once
-#include <libkazv-config.hpp>
-
-#include <immer/config.hpp> // https://github.com/arximboldi/immer/issues/168
+#include <kazv-defs.hpp>
#include <QObject>
#include <QQmlEngine>
diff --git a/src/matrix-room.cpp b/src/matrix-room.cpp
--- a/src/matrix-room.cpp
+++ b/src/matrix-room.cpp
@@ -3,9 +3,8 @@
* SPDX-FileCopyrightText: 2020-2024 tusooa <tusooa@kazv.moe>
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
-#include <libkazv-config.hpp>
-#include <immer/config.hpp> // https://github.com/arximboldi/immer/issues/168
+#include <kazv-defs.hpp>
#include <lager/setter.hpp>
#include <nlohmann/json.hpp>
diff --git a/src/matrix-sdk.hpp b/src/matrix-sdk.hpp
--- a/src/matrix-sdk.hpp
+++ b/src/matrix-sdk.hpp
@@ -5,8 +5,7 @@
*/
#pragma once
-#include <libkazv-config.hpp>
-#include <immer/config.hpp> // https://github.com/arximboldi/immer/issues/168
+#include <kazv-defs.hpp>
#include <QObject>
#include <QQmlEngine>
@@ -20,7 +19,12 @@
#include <random-generator.hpp>
#include "meta-types.hpp"
-
+Q_MOC_INCLUDE("matrix-room-list.hpp")
+Q_MOC_INCLUDE("matrix-device-list.hpp")
+Q_MOC_INCLUDE("matrix-promise.hpp")
+Q_MOC_INCLUDE("matrix-event.hpp")
+Q_MOC_INCLUDE("matrix-sticker-pack-list.hpp")
+Q_MOC_INCLUDE("matrix-user-given-attrs-map.hpp")
class MatrixRoomList;
class MatrixDeviceList;
diff --git a/src/matrix-sdk.cpp b/src/matrix-sdk.cpp
--- a/src/matrix-sdk.cpp
+++ b/src/matrix-sdk.cpp
@@ -3,8 +3,8 @@
* SPDX-FileCopyrightText: 2020-2024 tusooa <tusooa@kazv.moe>
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
-#include <libkazv-config.hpp>
-#include <immer/config.hpp> // https://github.com/arximboldi/immer/issues/168
+
+#include <kazv-defs.hpp>
#include <boost/archive/text_oarchive.hpp>
#include <boost/archive/text_iarchive.hpp>
diff --git a/src/matrix-sticker-pack-list.hpp b/src/matrix-sticker-pack-list.hpp
--- a/src/matrix-sticker-pack-list.hpp
+++ b/src/matrix-sticker-pack-list.hpp
@@ -5,8 +5,7 @@
*/
#pragma once
-#include <libkazv-config.hpp>
-#include <immer/config.hpp>
+#include <kazv-defs.hpp>
#include <QObject>
#include <QQmlEngine>
@@ -21,6 +20,7 @@
#include <base/event.hpp>
#include "matrix-sticker-pack-source.hpp"
+Q_MOC_INCLUDE("matrix-sticker-pack.hpp")
class MatrixStickerPack;
diff --git a/src/matrix-sticker-pack-list.cpp b/src/matrix-sticker-pack-list.cpp
--- a/src/matrix-sticker-pack-list.cpp
+++ b/src/matrix-sticker-pack-list.cpp
@@ -4,8 +4,7 @@
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
-#include <libkazv-config.hpp>
-#include <immer/config.hpp>
+#include <kazv-defs.hpp>
#include <lager/lenses/optional.hpp>
#include <lager/lenses/at.hpp>
diff --git a/src/matrix-sticker-pack-source.hpp b/src/matrix-sticker-pack-source.hpp
--- a/src/matrix-sticker-pack-source.hpp
+++ b/src/matrix-sticker-pack-source.hpp
@@ -5,8 +5,7 @@
*/
#pragma once
-#include <libkazv-config.hpp>
-#include <immer/config.hpp>
+#include <kazv-defs.hpp>
#include <base/event.hpp>
diff --git a/src/matrix-sticker-pack-source.cpp b/src/matrix-sticker-pack-source.cpp
--- a/src/matrix-sticker-pack-source.cpp
+++ b/src/matrix-sticker-pack-source.cpp
@@ -4,8 +4,7 @@
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
-#include <libkazv-config.hpp>
-#include <immer/config.hpp>
+#include <kazv-defs.hpp>
#include "matrix-sticker-pack-source.hpp"
diff --git a/src/matrix-sticker-pack.hpp b/src/matrix-sticker-pack.hpp
--- a/src/matrix-sticker-pack.hpp
+++ b/src/matrix-sticker-pack.hpp
@@ -5,8 +5,7 @@
*/
#pragma once
-#include <libkazv-config.hpp>
-#include <immer/config.hpp>
+#include <kazv-defs.hpp>
#include <QObject>
#include <QQmlEngine>
@@ -19,6 +18,8 @@
#include "matrix-sticker-pack-source.hpp"
#include "meta-types.hpp"
+Q_MOC_INCLUDE("matrix-sticker.hpp")
+Q_MOC_INCLUDE("matrix-event.hpp")
class MatrixSticker;
class MatrixEvent;
diff --git a/src/matrix-sticker-pack.cpp b/src/matrix-sticker-pack.cpp
--- a/src/matrix-sticker-pack.cpp
+++ b/src/matrix-sticker-pack.cpp
@@ -4,8 +4,7 @@
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
-#include <libkazv-config.hpp>
-#include <immer/config.hpp>
+#include <kazv-defs.hpp>
#include <cursorutil.hpp>
diff --git a/src/matrix-sticker.hpp b/src/matrix-sticker.hpp
--- a/src/matrix-sticker.hpp
+++ b/src/matrix-sticker.hpp
@@ -5,8 +5,7 @@
*/
#pragma once
-#include <libkazv-config.hpp>
-#include <immer/config.hpp>
+#include <kazv-defs.hpp>
#include <QObject>
#include <QQmlEngine>
diff --git a/src/matrix-sticker.cpp b/src/matrix-sticker.cpp
--- a/src/matrix-sticker.cpp
+++ b/src/matrix-sticker.cpp
@@ -4,8 +4,7 @@
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
-#include <libkazv-config.hpp>
-#include <immer/config.hpp>
+#include <kazv-defs.hpp>
#include <base/cursorutil.hpp>
diff --git a/src/matrix-user-given-attrs-map.hpp b/src/matrix-user-given-attrs-map.hpp
--- a/src/matrix-user-given-attrs-map.hpp
+++ b/src/matrix-user-given-attrs-map.hpp
@@ -5,8 +5,7 @@
*/
#pragma once
-#include <libkazv-config.hpp>
-#include <immer/config.hpp> // https://github.com/arximboldi/immer/issues/168
+#include <kazv-defs.hpp>
#include <QObject>
#include <QQmlEngine>
#include <QJsonObject>
@@ -14,6 +13,8 @@
#include <lager/extra/qt.hpp>
#include <event.hpp>
#include <client.hpp>
+Q_MOC_INCLUDE("matrix-promise.hpp")
+Q_MOC_INCLUDE(<QJsonValue>)
class QJsonValue;
class MatrixPromise;
diff --git a/src/matrix-user-given-attrs-map.cpp b/src/matrix-user-given-attrs-map.cpp
--- a/src/matrix-user-given-attrs-map.cpp
+++ b/src/matrix-user-given-attrs-map.cpp
@@ -4,8 +4,7 @@
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
-#include <libkazv-config.hpp>
-#include <immer/config.hpp> // https://github.com/arximboldi/immer/issues/168
+#include <kazv-defs.hpp>
#include <QJsonValue>
#include "matrix-promise.hpp"
#include "qt-json.hpp"
diff --git a/src/meta-types.hpp b/src/meta-types.hpp
--- a/src/meta-types.hpp
+++ b/src/meta-types.hpp
@@ -1,12 +1,11 @@
/*
* This file is part of kazv.
- * SPDX-FileCopyrightText: 2020 Tusooa Zhu <tusooa@kazv.moe>
+ * SPDX-FileCopyrightText: 2020-2024 tusooa <tusooa@kazv.moe>
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
#pragma once
-#include <libkazv-config.hpp>
-#include <immer/config.hpp> // https://github.com/arximboldi/immer/issues/168
+#include <kazv-defs.hpp>
#include <QMetaType>
diff --git a/src/meta-types.cpp b/src/meta-types.cpp
--- a/src/meta-types.cpp
+++ b/src/meta-types.cpp
@@ -3,9 +3,8 @@
* SPDX-FileCopyrightText: 2020-2024 tusooa <tusooa@kazv.moe>
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
-#include <libkazv-config.hpp>
-#include <immer/config.hpp> // https://github.com/arximboldi/immer/issues/168
+#include <kazv-defs.hpp>
#include "meta-types.hpp"
#include "kazv-platform.hpp"
diff --git a/src/qfunctionutils.hpp b/src/qfunctionutils.hpp
--- a/src/qfunctionutils.hpp
+++ b/src/qfunctionutils.hpp
@@ -7,8 +7,7 @@
/// https://github.com/juangburgos/QFunctionUtils/blob/master/src/qfunctionutils.h
#pragma once
-
-#include <libkazv-config.hpp>
+#include <kazv-defs.hpp>
#include <functional>
#include <QSharedPointer>
diff --git a/src/qt-job-handler.hpp b/src/qt-job-handler.hpp
--- a/src/qt-job-handler.hpp
+++ b/src/qt-job-handler.hpp
@@ -5,7 +5,7 @@
*/
#pragma once
-#include <libkazv-config.hpp>
+#include <kazv-defs.hpp>
#include <memory>
diff --git a/src/qt-job-handler.cpp b/src/qt-job-handler.cpp
--- a/src/qt-job-handler.cpp
+++ b/src/qt-job-handler.cpp
@@ -4,7 +4,7 @@
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
-#include <libkazv-config.hpp>
+#include <kazv-defs.hpp>
#include <unordered_map>
diff --git a/src/qt-job.hpp b/src/qt-job.hpp
--- a/src/qt-job.hpp
+++ b/src/qt-job.hpp
@@ -5,7 +5,7 @@
*/
#pragma once
-#include <libkazv-config.hpp>
+#include <kazv-defs.hpp>
#include <memory>
diff --git a/src/qt-job.cpp b/src/qt-job.cpp
--- a/src/qt-job.cpp
+++ b/src/qt-job.cpp
@@ -4,7 +4,7 @@
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
-#include <libkazv-config.hpp>
+#include <kazv-defs.hpp>
#include <QNetworkAccessManager>
#include <QPointer>
diff --git a/src/qt-json.hpp b/src/qt-json.hpp
--- a/src/qt-json.hpp
+++ b/src/qt-json.hpp
@@ -1,13 +1,11 @@
/*
* This file is part of kazv.
- * SPDX-FileCopyrightText: 2020 Tusooa Zhu <tusooa@kazv.moe>
+ * SPDX-FileCopyrightText: 2020-2024 tusooa <tusooa@kazv.moe>
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
#pragma once
-#include <libkazv-config.hpp>
-
-#include <immer/config.hpp> // https://github.com/arximboldi/immer/issues/168
+#include <kazv-defs.hpp>
#include <nlohmann/json.hpp>
#include <QJsonObject>
diff --git a/src/qt-promise-handler.hpp b/src/qt-promise-handler.hpp
--- a/src/qt-promise-handler.hpp
+++ b/src/qt-promise-handler.hpp
@@ -5,8 +5,7 @@
*/
#pragma once
-
-#include <libkazv-config.hpp>
+#include <kazv-defs.hpp>
#include <future>
diff --git a/src/qt-promise-handler.cpp b/src/qt-promise-handler.cpp
--- a/src/qt-promise-handler.cpp
+++ b/src/qt-promise-handler.cpp
@@ -4,7 +4,7 @@
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
-#include <libkazv-config.hpp>
+#include <kazv-defs.hpp>
#include "qt-promise-handler.hpp"
diff --git a/src/qt-rand-adapter.hpp b/src/qt-rand-adapter.hpp
--- a/src/qt-rand-adapter.hpp
+++ b/src/qt-rand-adapter.hpp
@@ -1,11 +1,11 @@
/*
* This file is part of kazv.
- * SPDX-FileCopyrightText: 2020-2021 Tusooa Zhu <tusooa@kazv.moe>
+ * SPDX-FileCopyrightText: 2020-2024 tusooa <tusooa@kazv.moe>
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
#pragma once
-#include <libkazv-config.hpp>
+#include <kazv-defs.hpp>
#include <memory>
diff --git a/src/qt-rand-adapter.cpp b/src/qt-rand-adapter.cpp
--- a/src/qt-rand-adapter.cpp
+++ b/src/qt-rand-adapter.cpp
@@ -1,10 +1,10 @@
/*
* This file is part of kazv.
- * SPDX-FileCopyrightText: 2020-2021 Tusooa Zhu <tusooa@kazv.moe>
+ * SPDX-FileCopyrightText: 2020-2024 tusooa <tusooa@kazv.moe>
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
-#include <libkazv-config.hpp>
+#include <kazv-defs.hpp>
#include <QRandomGenerator>
diff --git a/src/register-types.hpp b/src/register-types.hpp
--- a/src/register-types.hpp
+++ b/src/register-types.hpp
@@ -5,6 +5,6 @@
*/
#pragma once
-#include <libkazv-config.hpp>
+#include <kazv-defs.hpp>
void registerKazvQmlTypes();
diff --git a/src/register-types.cpp b/src/register-types.cpp
--- a/src/register-types.cpp
+++ b/src/register-types.cpp
@@ -4,7 +4,7 @@
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
-#include <libkazv-config.hpp>
+#include <kazv-defs.hpp>
#include <QtQml>
@@ -54,6 +54,11 @@
qmlRegisterUncreatableType<MatrixStickerPack>("moe.kazv.mxc.kazv", 0, 0, "MatrixStickerPack", "");
qmlRegisterUncreatableType<MatrixStickerPackList>("moe.kazv.mxc.kazv", 0, 0, "MatrixStickerPackList", "");
qmlRegisterUncreatableType<MatrixUserGivenAttrsMap>("moe.kazv.mxc.kazv", 0, 0, "MatrixUserGivenAttrsMap", "");
+#if KAZV_KF_QT_MAJOR_VERSION == 5
qmlRegisterSingletonInstance<KazvUtil>("moe.kazv.mxc.kazv", 0, 0, "KazvUtil", new KazvUtil());
qmlRegisterSingletonInstance<ShortcutUtil>("moe.kazv.mxc.kazvshortcuts", 0, 0, "ShortcutUtil", new ShortcutUtil());
+#else
+ qmlRegisterSingletonInstance("moe.kazv.mxc.kazv", 0, 0, "KazvUtil", new KazvUtil());
+ qmlRegisterSingletonInstance("moe.kazv.mxc.kazvshortcuts", 0, 0, "ShortcutUtil", new ShortcutUtil());
+#endif
}
diff --git a/src/shortcuts/shortcut-util.hpp b/src/shortcuts/shortcut-util.hpp
--- a/src/shortcuts/shortcut-util.hpp
+++ b/src/shortcuts/shortcut-util.hpp
@@ -1,12 +1,11 @@
/*
* This file is part of kazv.
- * SPDX-FileCopyrightText: 2020-2022 Tusooa Zhu <tusooa@kazv.moe>
+ * SPDX-FileCopyrightText: 2020-2024 tusooa <tusooa@kazv.moe>
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
#pragma once
-
-#include <libkazv-config.hpp>
+#include <kazv-defs.hpp>
#include <QObject>
#include <QQmlEngine>
#include <QString>
@@ -15,6 +14,7 @@
class ShortcutUtil : public QObject
{
Q_OBJECT
+ QML_ELEMENT
QML_SINGLETON
public Q_SLOTS:
diff --git a/src/shortcuts/shortcut-util.cpp b/src/shortcuts/shortcut-util.cpp
--- a/src/shortcuts/shortcut-util.cpp
+++ b/src/shortcuts/shortcut-util.cpp
@@ -1,10 +1,10 @@
/*
* This file is part of kazv.
- * SPDX-FileCopyrightText: 2020-2022 Tusooa Zhu <tusooa@kazv.moe>
+ * SPDX-FileCopyrightText: 2020-2024 tusooa <tusooa@kazv.moe>
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
-#include <libkazv-config.hpp>
+#include <kazv-defs.hpp>
#include "shortcut-util.hpp"
#include <QKeySequence>
diff --git a/src/tests/device-mgmt-test.hpp b/src/tests/device-mgmt-test.hpp
--- a/src/tests/device-mgmt-test.hpp
+++ b/src/tests/device-mgmt-test.hpp
@@ -4,8 +4,7 @@
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
-#include <libkazv-config.hpp>
-#include <immer/config.hpp> // https://github.com/arximboldi/immer/issues/168
+#include <kazv-defs.hpp>
#include <QtTest>
diff --git a/src/tests/device-mgmt-test.cpp b/src/tests/device-mgmt-test.cpp
--- a/src/tests/device-mgmt-test.cpp
+++ b/src/tests/device-mgmt-test.cpp
@@ -4,8 +4,7 @@
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
-#include <libkazv-config.hpp>
-#include <immer/config.hpp> // https://github.com/arximboldi/immer/issues/168
+#include <kazv-defs.hpp>
#include <memory>
diff --git a/src/tests/kazv-markdown-test.cpp b/src/tests/kazv-markdown-test.cpp
--- a/src/tests/kazv-markdown-test.cpp
+++ b/src/tests/kazv-markdown-test.cpp
@@ -4,8 +4,7 @@
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
-#include <libkazv-config.hpp>
-#include <immer/config.hpp> // https://github.com/arximboldi/immer/issues/168
+#include <kazv-defs.hpp>
#include <memory>
diff --git a/src/tests/matrix-link-test.cpp b/src/tests/matrix-link-test.cpp
--- a/src/tests/matrix-link-test.cpp
+++ b/src/tests/matrix-link-test.cpp
@@ -4,8 +4,7 @@
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
-#include <libkazv-config.hpp>
-#include <immer/config.hpp> // https://github.com/arximboldi/immer/issues/168
+#include <kazv-defs.hpp>
#include <vector>
#include <QtTest>
diff --git a/src/tests/matrix-promise-test.cpp b/src/tests/matrix-promise-test.cpp
--- a/src/tests/matrix-promise-test.cpp
+++ b/src/tests/matrix-promise-test.cpp
@@ -4,8 +4,7 @@
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
-#include <libkazv-config.hpp>
-#include <immer/config.hpp> // https://github.com/arximboldi/immer/issues/168
+#include <kazv-defs.hpp>
#include <vector>
#include <algorithm>
diff --git a/src/tests/matrix-room-list-test.cpp b/src/tests/matrix-room-list-test.cpp
--- a/src/tests/matrix-room-list-test.cpp
+++ b/src/tests/matrix-room-list-test.cpp
@@ -4,8 +4,7 @@
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
-#include <libkazv-config.hpp>
-#include <immer/config.hpp> // https://github.com/arximboldi/immer/issues/168
+#include <kazv-defs.hpp>
#include <memory>
diff --git a/src/tests/matrix-room-member-list-model-test.cpp b/src/tests/matrix-room-member-list-model-test.cpp
--- a/src/tests/matrix-room-member-list-model-test.cpp
+++ b/src/tests/matrix-room-member-list-model-test.cpp
@@ -4,8 +4,7 @@
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
-#include <libkazv-config.hpp>
-#include <immer/config.hpp> // https://github.com/arximboldi/immer/issues/168
+#include <kazv-defs.hpp>
#include <memory>
diff --git a/src/tests/matrix-room-timeline-benchmark-test.cpp b/src/tests/matrix-room-timeline-benchmark-test.cpp
--- a/src/tests/matrix-room-timeline-benchmark-test.cpp
+++ b/src/tests/matrix-room-timeline-benchmark-test.cpp
@@ -4,8 +4,7 @@
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
-#include <libkazv-config.hpp>
-#include <immer/config.hpp> // https://github.com/arximboldi/immer/issues/168
+#include <kazv-defs.hpp>
#include <memory>
diff --git a/src/tests/matrix-room-timeline-test.cpp b/src/tests/matrix-room-timeline-test.cpp
--- a/src/tests/matrix-room-timeline-test.cpp
+++ b/src/tests/matrix-room-timeline-test.cpp
@@ -4,8 +4,7 @@
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
-#include <libkazv-config.hpp>
-#include <immer/config.hpp> // https://github.com/arximboldi/immer/issues/168
+#include <kazv-defs.hpp>
#include <memory>
diff --git a/src/tests/matrix-sdk-test.cpp b/src/tests/matrix-sdk-test.cpp
--- a/src/tests/matrix-sdk-test.cpp
+++ b/src/tests/matrix-sdk-test.cpp
@@ -4,8 +4,7 @@
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
-#include <libkazv-config.hpp>
-#include <immer/config.hpp> // https://github.com/arximboldi/immer/issues/168
+#include <kazv-defs.hpp>
#include <memory>
diff --git a/src/tests/matrix-sticker-pack-test.cpp b/src/tests/matrix-sticker-pack-test.cpp
--- a/src/tests/matrix-sticker-pack-test.cpp
+++ b/src/tests/matrix-sticker-pack-test.cpp
@@ -4,8 +4,7 @@
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
-#include <libkazv-config.hpp>
-#include <immer/config.hpp> // https://github.com/arximboldi/immer/issues/168
+#include <kazv-defs.hpp>
#include <memory>
diff --git a/src/tests/matrix-user-given-attrs-map-test.cpp b/src/tests/matrix-user-given-attrs-map-test.cpp
--- a/src/tests/matrix-user-given-attrs-map-test.cpp
+++ b/src/tests/matrix-user-given-attrs-map-test.cpp
@@ -4,8 +4,7 @@
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
-#include <libkazv-config.hpp>
-#include <immer/config.hpp> // https://github.com/arximboldi/immer/issues/168
+#include <kazv-defs.hpp>
#include <vector>
#include <QtTest>
diff --git a/src/tests/qt-job-handler-test.hpp b/src/tests/qt-job-handler-test.hpp
--- a/src/tests/qt-job-handler-test.hpp
+++ b/src/tests/qt-job-handler-test.hpp
@@ -4,6 +4,7 @@
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
+#include <kazv-defs.hpp>
#include <QtTest>
class QtJobHandlerTest : public QObject
diff --git a/src/tests/qt-job-handler-test.cpp b/src/tests/qt-job-handler-test.cpp
--- a/src/tests/qt-job-handler-test.cpp
+++ b/src/tests/qt-job-handler-test.cpp
@@ -4,7 +4,7 @@
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
-#include <libkazv-config.hpp>
+#include <kazv-defs.hpp>
#include <basejob.hpp>
diff --git a/src/tests/qt-json-test.cpp b/src/tests/qt-json-test.cpp
--- a/src/tests/qt-json-test.cpp
+++ b/src/tests/qt-json-test.cpp
@@ -4,8 +4,7 @@
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
-#include <libkazv-config.hpp>
-#include <immer/config.hpp>
+#include <kazv-defs.hpp>
#include <QtTest>
diff --git a/src/tests/qt-promise-handler-test.hpp b/src/tests/qt-promise-handler-test.hpp
--- a/src/tests/qt-promise-handler-test.hpp
+++ b/src/tests/qt-promise-handler-test.hpp
@@ -1,11 +1,11 @@
/*
* This file is part of kazv.
- * SPDX-FileCopyrightText: 2020-2021 Tusooa Zhu <tusooa@kazv.moe>
+ * SPDX-FileCopyrightText: 2020-2024 tusooa <tusooa@kazv.moe>
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
#pragma once
-
+#include <kazv-defs.hpp>
#include <QtTest>
class QtPromiseHandlerTest : public QObject
diff --git a/src/tests/qt-promise-handler-test.cpp b/src/tests/qt-promise-handler-test.cpp
--- a/src/tests/qt-promise-handler-test.cpp
+++ b/src/tests/qt-promise-handler-test.cpp
@@ -1,10 +1,10 @@
/*
* This file is part of kazv.
- * SPDX-FileCopyrightText: 2020-2021 Tusooa Zhu <tusooa@kazv.moe>
+ * SPDX-FileCopyrightText: 2020-2024 tusooa <tusooa@kazv.moe>
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
-#include <libkazv-config.hpp>
+#include <kazv-defs.hpp>
#include <memory>
#include <vector>
diff --git a/src/tests/quick-test.cpp b/src/tests/quick-test.cpp
--- a/src/tests/quick-test.cpp
+++ b/src/tests/quick-test.cpp
@@ -1,3 +1,10 @@
+/*
+ * This file is part of kazv.
+ * SPDX-FileCopyrightText: 2020-2024 tusooa <tusooa@kazv.moe>
+ * SPDX-License-Identifier: AGPL-3.0-or-later
+ */
+
+#include <kazv-defs.hpp>
#include <QtQuickTest>
#include <QQmlEngine>
#include <QQmlContext>
diff --git a/src/tests/test-model.hpp b/src/tests/test-model.hpp
--- a/src/tests/test-model.hpp
+++ b/src/tests/test-model.hpp
@@ -5,9 +5,7 @@
*/
#pragma once
-
-#include <libkazv-config.hpp>
-#include <immer/config.hpp> // https://github.com/arximboldi/immer/issues/168
+#include <kazv-defs.hpp>
#include <sdk-model.hpp>
diff --git a/src/tests/test-model.cpp b/src/tests/test-model.cpp
--- a/src/tests/test-model.cpp
+++ b/src/tests/test-model.cpp
@@ -4,8 +4,7 @@
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
-#include <libkazv-config.hpp>
-#include <immer/config.hpp> // https://github.com/arximboldi/immer/issues/168
+#include <kazv-defs.hpp>
#include "test-model.hpp"
diff --git a/src/tests/test-utils.hpp b/src/tests/test-utils.hpp
--- a/src/tests/test-utils.hpp
+++ b/src/tests/test-utils.hpp
@@ -5,9 +5,7 @@
*/
#pragma once
-
-#include <libkazv-config.hpp>
-#include <immer/config.hpp> // https://github.com/arximboldi/immer/issues/168
+#include <kazv-defs.hpp>
#include <memory>
diff --git a/src/tests/tests.hpp b/src/tests/tests.hpp
--- a/src/tests/tests.hpp
+++ b/src/tests/tests.hpp
@@ -5,6 +5,7 @@
*/
#pragma once
+#include <kazv-defs.hpp>
#include <string>
#ifndef TEST_SERVER
diff --git a/src/upload-job-model.hpp b/src/upload-job-model.hpp
--- a/src/upload-job-model.hpp
+++ b/src/upload-job-model.hpp
@@ -3,8 +3,9 @@
* SPDX-FileCopyrightText: 2023 nannanko <nannanko@kazv.moe>
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
-#pragma once
+#pragma once
+#include <kazv-defs.hpp>
#include "kazv-io-job.hpp"
#include <QAbstractListModel>
diff --git a/src/upload-job-model.cpp b/src/upload-job-model.cpp
--- a/src/upload-job-model.cpp
+++ b/src/upload-job-model.cpp
@@ -3,6 +3,8 @@
* SPDX-FileCopyrightText: 2023 nannanko <nannanko@kazv.moe>
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
+
+#include <kazv-defs.hpp>
#include "upload-job-model.hpp"
#include "kazv-io-job.hpp"
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Nov 22, 8:34 PM (3 h, 33 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
39074
Default Alt Text
D44.1732336441.diff (41 KB)
Attached To
Mode
D44: Make compile with Qt6 and KF6
Attached
Detach File
Event Timeline
Log In to Comment