Remove a few more unused symbols

v0.11.2-next
Nicolas Werner 2 years ago
parent ae7bb333a1
commit a1c4889339
No known key found for this signature in database
GPG Key ID: C8D75E610773F2D9
  1. 2
      CMakeLists.txt
  2. 6
      cmake/nheko.h
  3. 40
      src/Cache.cpp
  4. 6
      src/ChatPage.cpp
  5. 4
      src/ChatPage.h
  6. 16
      src/Logging.cpp
  7. 4
      src/UserSettingsPage.h
  8. 2
      src/dbus/NhekoDBusApi.h

@ -597,7 +597,7 @@ if(USE_BUNDLED_MTXCLIENT)
FetchContent_Declare(
MatrixClient
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_TESTS OFF CACHE INTERNAL "")

@ -1,7 +1,7 @@
namespace nheko {
constexpr auto version = "${PROJECT_VERSION}";
constexpr auto build_os = "${CMAKE_HOST_SYSTEM_NAME}";
constexpr auto enable_debug_log = ${SPDLOG_DEBUG_ON};
inline constexpr auto version = "${PROJECT_VERSION}";
inline constexpr auto build_os = "${CMAKE_HOST_SYSTEM_NAME}";
inline constexpr auto enable_debug_log = ${SPDLOG_DEBUG_ON};
}
# 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 CURRENT_ONLINE_BACKUP_VERSION("current_online_backup_version");
constexpr auto MAX_DBS = 32384UL;
constexpr auto BATCH_SIZE = 100;
static constexpr auto MAX_DBS = 32384UL;
static constexpr auto BATCH_SIZE = 100;
#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
constexpr size_t MAX_RESTORED_MESSAGES = 30'000;
static constexpr auto DB_SIZE = 32ULL * 1024ULL * 1024ULL * 1024ULL; // 32 GB
static constexpr size_t MAX_RESTORED_MESSAGES = 30'000;
#elif Q_PROCESSOR_WORDSIZE == 4 // 32-bit address space limits mmaps
constexpr auto DB_SIZE = 1ULL * 1024ULL * 1024ULL * 1024ULL; // 1 GB
constexpr size_t MAX_RESTORED_MESSAGES = 5'000;
static constexpr auto DB_SIZE = 1ULL * 1024ULL * 1024ULL * 1024ULL; // 1 GB
static constexpr size_t MAX_RESTORED_MESSAGES = 5'000;
#else
#error Not enough virtual address space for the database on target CPU
#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).
//! Format: room_id -> RoomInfo
constexpr auto ROOMS_DB("rooms");
constexpr auto INVITES_DB("invites");
static constexpr auto ROOMS_DB("rooms");
static constexpr auto INVITES_DB("invites");
//! 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)
constexpr auto SPACES_CHILDREN_DB("space_children");
static constexpr auto SPACES_CHILDREN_DB("space_children");
//! 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.
constexpr auto READ_RECEIPTS_DB("read_receipts");
constexpr auto NOTIFICATIONS_DB("sent_notifications");
constexpr auto PRESENCE_DB("presence");
static constexpr auto READ_RECEIPTS_DB("read_receipts");
static constexpr auto NOTIFICATIONS_DB("sent_notifications");
static constexpr auto PRESENCE_DB("presence");
//! Encryption related databases.
//! user_id -> list of devices
constexpr auto DEVICES_DB("devices");
static constexpr auto DEVICES_DB("devices");
//! 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.
constexpr auto ENCRYPTED_ROOMS_DB("encrypted_rooms");
static constexpr auto ENCRYPTED_ROOMS_DB("encrypted_rooms");
//! 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
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
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 Receipts = std::map<std::string, std::map<std::string, uint64_t>>;

@ -35,9 +35,9 @@
#include "blurhash.hpp"
ChatPage *ChatPage::instance_ = nullptr;
constexpr int CHECK_CONNECTIVITY_INTERVAL = 15'000;
constexpr int RETRY_TIMEOUT = 5'000;
constexpr size_t MAX_ONETIME_KEYS = 50;
static constexpr int CHECK_CONNECTIVITY_INTERVAL = 15'000;
static constexpr int RETRY_TIMEOUT = 5'000;
static constexpr size_t MAX_ONETIME_KEYS = 50;
Q_DECLARE_METATYPE(std::optional<mtx::crypto::EncryptedFile>)
Q_DECLARE_METATYPE(std::optional<RelatedInfo>)

@ -34,10 +34,6 @@ class NotificationsManager;
class TimelineModel;
class CallManager;
constexpr int CONSENSUS_TIMEOUT = 1000;
constexpr int SHOW_CONTENT_TIMEOUT = 3000;
constexpr int TYPING_REFRESH_TIMEOUT = 10000;
namespace mtx::requests {
struct CreateRoom;
}

@ -19,14 +19,14 @@
#include <mtx/log.hpp>
namespace {
std::shared_ptr<spdlog::logger> db_logger = nullptr;
std::shared_ptr<spdlog::logger> net_logger = nullptr;
std::shared_ptr<spdlog::logger> crypto_logger = nullptr;
std::shared_ptr<spdlog::logger> ui_logger = nullptr;
std::shared_ptr<spdlog::logger> qml_logger = nullptr;
constexpr auto MAX_FILE_SIZE = 1024 * 1024 * 6;
constexpr auto MAX_LOG_FILES = 3;
static std::shared_ptr<spdlog::logger> db_logger = nullptr;
static std::shared_ptr<spdlog::logger> net_logger = nullptr;
static std::shared_ptr<spdlog::logger> crypto_logger = nullptr;
static std::shared_ptr<spdlog::logger> ui_logger = nullptr;
static std::shared_ptr<spdlog::logger> qml_logger = nullptr;
static constexpr auto MAX_FILE_SIZE = 1024 * 1024 * 6;
static constexpr auto MAX_LOG_FILES = 3;
void
qmlMessageHandler(QtMsgType type, const QMessageLogContext &context, const QString &msg)

@ -23,10 +23,6 @@ class QSpinBox;
class QHBoxLayout;
class QVBoxLayout;
constexpr int OptionMargin = 6;
constexpr int LayoutTopMargin = 50;
constexpr int LayoutBottomMargin = LayoutTopMargin;
class UserSettings final : public QObject
{
Q_OBJECT

@ -19,7 +19,7 @@ init();
//! The nheko D-Bus API version provided by this file. The API version number follows semantic
//! 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
//! are compatible.

Loading…
Cancel
Save