mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-21 18:50:47 +03:00
Remove a few more unused symbols
This commit is contained in:
parent
ae7bb333a1
commit
a1c4889339
8 changed files with 36 additions and 44 deletions
|
@ -597,7 +597,7 @@ if(USE_BUNDLED_MTXCLIENT)
|
||||||
FetchContent_Declare(
|
FetchContent_Declare(
|
||||||
MatrixClient
|
MatrixClient
|
||||||
GIT_REPOSITORY https://github.com/Nheko-Reborn/mtxclient.git
|
GIT_REPOSITORY https://github.com/Nheko-Reborn/mtxclient.git
|
||||||
GIT_TAG v0.9.0
|
GIT_TAG a2ea44e15ea5bdd340e39d4ed32ff082ca972a6d
|
||||||
)
|
)
|
||||||
set(BUILD_LIB_EXAMPLES OFF CACHE INTERNAL "")
|
set(BUILD_LIB_EXAMPLES OFF CACHE INTERNAL "")
|
||||||
set(BUILD_LIB_TESTS OFF CACHE INTERNAL "")
|
set(BUILD_LIB_TESTS OFF CACHE INTERNAL "")
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
namespace nheko {
|
namespace nheko {
|
||||||
constexpr auto version = "${PROJECT_VERSION}";
|
inline constexpr auto version = "${PROJECT_VERSION}";
|
||||||
constexpr auto build_os = "${CMAKE_HOST_SYSTEM_NAME}";
|
inline constexpr auto build_os = "${CMAKE_HOST_SYSTEM_NAME}";
|
||||||
constexpr auto enable_debug_log = ${SPDLOG_DEBUG_ON};
|
inline constexpr auto enable_debug_log = ${SPDLOG_DEBUG_ON};
|
||||||
}
|
}
|
||||||
|
|
||||||
# cmakedefine01 HAVE_BACKTRACE_SYMBOLS_FD
|
# cmakedefine01 HAVE_BACKTRACE_SYMBOLS_FD
|
||||||
|
|
|
@ -48,15 +48,15 @@ static const std::string_view OLM_ACCOUNT_KEY("olm_account");
|
||||||
static const std::string_view CACHE_FORMAT_VERSION_KEY("cache_format_version");
|
static const std::string_view CACHE_FORMAT_VERSION_KEY("cache_format_version");
|
||||||
static const std::string_view CURRENT_ONLINE_BACKUP_VERSION("current_online_backup_version");
|
static const std::string_view CURRENT_ONLINE_BACKUP_VERSION("current_online_backup_version");
|
||||||
|
|
||||||
constexpr auto MAX_DBS = 32384UL;
|
static constexpr auto MAX_DBS = 32384UL;
|
||||||
constexpr auto BATCH_SIZE = 100;
|
static constexpr auto BATCH_SIZE = 100;
|
||||||
|
|
||||||
#if Q_PROCESSOR_WORDSIZE >= 5 // 40-bit or more, up to 2^(8*WORDSIZE) words addressable.
|
#if Q_PROCESSOR_WORDSIZE >= 5 // 40-bit or more, up to 2^(8*WORDSIZE) words addressable.
|
||||||
constexpr auto DB_SIZE = 32ULL * 1024ULL * 1024ULL * 1024ULL; // 32 GB
|
static constexpr auto DB_SIZE = 32ULL * 1024ULL * 1024ULL * 1024ULL; // 32 GB
|
||||||
constexpr size_t MAX_RESTORED_MESSAGES = 30'000;
|
static constexpr size_t MAX_RESTORED_MESSAGES = 30'000;
|
||||||
#elif Q_PROCESSOR_WORDSIZE == 4 // 32-bit address space limits mmaps
|
#elif Q_PROCESSOR_WORDSIZE == 4 // 32-bit address space limits mmaps
|
||||||
constexpr auto DB_SIZE = 1ULL * 1024ULL * 1024ULL * 1024ULL; // 1 GB
|
static constexpr auto DB_SIZE = 1ULL * 1024ULL * 1024ULL * 1024ULL; // 1 GB
|
||||||
constexpr size_t MAX_RESTORED_MESSAGES = 5'000;
|
static constexpr size_t MAX_RESTORED_MESSAGES = 5'000;
|
||||||
#else
|
#else
|
||||||
#error Not enough virtual address space for the database on target CPU
|
#error Not enough virtual address space for the database on target CPU
|
||||||
#endif
|
#endif
|
||||||
|
@ -65,34 +65,34 @@ constexpr size_t MAX_RESTORED_MESSAGES = 5'000;
|
||||||
//!
|
//!
|
||||||
//! Contains UI information for the joined rooms. (i.e name, topic, avatar url etc).
|
//! Contains UI information for the joined rooms. (i.e name, topic, avatar url etc).
|
||||||
//! Format: room_id -> RoomInfo
|
//! Format: room_id -> RoomInfo
|
||||||
constexpr auto ROOMS_DB("rooms");
|
static constexpr auto ROOMS_DB("rooms");
|
||||||
constexpr auto INVITES_DB("invites");
|
static constexpr auto INVITES_DB("invites");
|
||||||
//! maps each room to its parent space (id->id)
|
//! maps each room to its parent space (id->id)
|
||||||
constexpr auto SPACES_PARENTS_DB("space_parents");
|
static constexpr auto SPACES_PARENTS_DB("space_parents");
|
||||||
//! maps each space to its current children (id->id)
|
//! maps each space to its current children (id->id)
|
||||||
constexpr auto SPACES_CHILDREN_DB("space_children");
|
static constexpr auto SPACES_CHILDREN_DB("space_children");
|
||||||
//! Information that must be kept between sync requests.
|
//! Information that must be kept between sync requests.
|
||||||
constexpr auto SYNC_STATE_DB("sync_state");
|
static constexpr auto SYNC_STATE_DB("sync_state");
|
||||||
//! Read receipts per room/event.
|
//! Read receipts per room/event.
|
||||||
constexpr auto READ_RECEIPTS_DB("read_receipts");
|
static constexpr auto READ_RECEIPTS_DB("read_receipts");
|
||||||
constexpr auto NOTIFICATIONS_DB("sent_notifications");
|
static constexpr auto NOTIFICATIONS_DB("sent_notifications");
|
||||||
constexpr auto PRESENCE_DB("presence");
|
static constexpr auto PRESENCE_DB("presence");
|
||||||
|
|
||||||
//! Encryption related databases.
|
//! Encryption related databases.
|
||||||
|
|
||||||
//! user_id -> list of devices
|
//! user_id -> list of devices
|
||||||
constexpr auto DEVICES_DB("devices");
|
static constexpr auto DEVICES_DB("devices");
|
||||||
//! device_id -> device keys
|
//! device_id -> device keys
|
||||||
constexpr auto DEVICE_KEYS_DB("device_keys");
|
static constexpr auto DEVICE_KEYS_DB("device_keys");
|
||||||
//! room_ids that have encryption enabled.
|
//! room_ids that have encryption enabled.
|
||||||
constexpr auto ENCRYPTED_ROOMS_DB("encrypted_rooms");
|
static constexpr auto ENCRYPTED_ROOMS_DB("encrypted_rooms");
|
||||||
|
|
||||||
//! room_id -> pickled OlmInboundGroupSession
|
//! room_id -> pickled OlmInboundGroupSession
|
||||||
constexpr auto INBOUND_MEGOLM_SESSIONS_DB("inbound_megolm_sessions");
|
static constexpr auto INBOUND_MEGOLM_SESSIONS_DB("inbound_megolm_sessions");
|
||||||
//! MegolmSessionIndex -> pickled OlmOutboundGroupSession
|
//! MegolmSessionIndex -> pickled OlmOutboundGroupSession
|
||||||
constexpr auto OUTBOUND_MEGOLM_SESSIONS_DB("outbound_megolm_sessions");
|
static constexpr auto OUTBOUND_MEGOLM_SESSIONS_DB("outbound_megolm_sessions");
|
||||||
//! MegolmSessionIndex -> session data about which devices have access to this
|
//! MegolmSessionIndex -> session data about which devices have access to this
|
||||||
constexpr auto MEGOLM_SESSIONS_DATA_DB("megolm_sessions_data_db");
|
static constexpr auto MEGOLM_SESSIONS_DATA_DB("megolm_sessions_data_db");
|
||||||
|
|
||||||
using CachedReceipts = std::multimap<uint64_t, std::string, std::greater<uint64_t>>;
|
using CachedReceipts = std::multimap<uint64_t, std::string, std::greater<uint64_t>>;
|
||||||
using Receipts = std::map<std::string, std::map<std::string, uint64_t>>;
|
using Receipts = std::map<std::string, std::map<std::string, uint64_t>>;
|
||||||
|
|
|
@ -34,10 +34,10 @@
|
||||||
|
|
||||||
#include "blurhash.hpp"
|
#include "blurhash.hpp"
|
||||||
|
|
||||||
ChatPage *ChatPage::instance_ = nullptr;
|
ChatPage *ChatPage::instance_ = nullptr;
|
||||||
constexpr int CHECK_CONNECTIVITY_INTERVAL = 15'000;
|
static constexpr int CHECK_CONNECTIVITY_INTERVAL = 15'000;
|
||||||
constexpr int RETRY_TIMEOUT = 5'000;
|
static constexpr int RETRY_TIMEOUT = 5'000;
|
||||||
constexpr size_t MAX_ONETIME_KEYS = 50;
|
static constexpr size_t MAX_ONETIME_KEYS = 50;
|
||||||
|
|
||||||
Q_DECLARE_METATYPE(std::optional<mtx::crypto::EncryptedFile>)
|
Q_DECLARE_METATYPE(std::optional<mtx::crypto::EncryptedFile>)
|
||||||
Q_DECLARE_METATYPE(std::optional<RelatedInfo>)
|
Q_DECLARE_METATYPE(std::optional<RelatedInfo>)
|
||||||
|
|
|
@ -34,10 +34,6 @@ class NotificationsManager;
|
||||||
class TimelineModel;
|
class TimelineModel;
|
||||||
class CallManager;
|
class CallManager;
|
||||||
|
|
||||||
constexpr int CONSENSUS_TIMEOUT = 1000;
|
|
||||||
constexpr int SHOW_CONTENT_TIMEOUT = 3000;
|
|
||||||
constexpr int TYPING_REFRESH_TIMEOUT = 10000;
|
|
||||||
|
|
||||||
namespace mtx::requests {
|
namespace mtx::requests {
|
||||||
struct CreateRoom;
|
struct CreateRoom;
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,14 +19,14 @@
|
||||||
#include <mtx/log.hpp>
|
#include <mtx/log.hpp>
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
std::shared_ptr<spdlog::logger> db_logger = nullptr;
|
static std::shared_ptr<spdlog::logger> db_logger = nullptr;
|
||||||
std::shared_ptr<spdlog::logger> net_logger = nullptr;
|
static std::shared_ptr<spdlog::logger> net_logger = nullptr;
|
||||||
std::shared_ptr<spdlog::logger> crypto_logger = nullptr;
|
static std::shared_ptr<spdlog::logger> crypto_logger = nullptr;
|
||||||
std::shared_ptr<spdlog::logger> ui_logger = nullptr;
|
static std::shared_ptr<spdlog::logger> ui_logger = nullptr;
|
||||||
std::shared_ptr<spdlog::logger> qml_logger = nullptr;
|
static std::shared_ptr<spdlog::logger> qml_logger = nullptr;
|
||||||
|
|
||||||
constexpr auto MAX_FILE_SIZE = 1024 * 1024 * 6;
|
static constexpr auto MAX_FILE_SIZE = 1024 * 1024 * 6;
|
||||||
constexpr auto MAX_LOG_FILES = 3;
|
static constexpr auto MAX_LOG_FILES = 3;
|
||||||
|
|
||||||
void
|
void
|
||||||
qmlMessageHandler(QtMsgType type, const QMessageLogContext &context, const QString &msg)
|
qmlMessageHandler(QtMsgType type, const QMessageLogContext &context, const QString &msg)
|
||||||
|
|
|
@ -23,10 +23,6 @@ class QSpinBox;
|
||||||
class QHBoxLayout;
|
class QHBoxLayout;
|
||||||
class QVBoxLayout;
|
class QVBoxLayout;
|
||||||
|
|
||||||
constexpr int OptionMargin = 6;
|
|
||||||
constexpr int LayoutTopMargin = 50;
|
|
||||||
constexpr int LayoutBottomMargin = LayoutTopMargin;
|
|
||||||
|
|
||||||
class UserSettings final : public QObject
|
class UserSettings final : public QObject
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
|
@ -19,7 +19,7 @@ init();
|
||||||
|
|
||||||
//! The nheko D-Bus API version provided by this file. The API version number follows semantic
|
//! The nheko D-Bus API version provided by this file. The API version number follows semantic
|
||||||
//! versioning as defined by https://semver.org.
|
//! versioning as defined by https://semver.org.
|
||||||
const QVersionNumber dbusApiVersion{1, 0, 1};
|
inline const QVersionNumber dbusApiVersion{1, 0, 1};
|
||||||
|
|
||||||
//! Compare the installed Nheko API to the version that your client app targets to see if they
|
//! Compare the installed Nheko API to the version that your client app targets to see if they
|
||||||
//! are compatible.
|
//! are compatible.
|
||||||
|
|
Loading…
Reference in a new issue