summary refs log tree commit diff
path: root/src/Cache.cpp
diff options
context:
space:
mode:
authorNicolas Werner <nicolas.werner@hotmail.de>2023-06-02 00:24:26 +0200
committerNicolas Werner <nicolas.werner@hotmail.de>2023-06-08 22:32:07 +0200
commitb518f6902e909b22e1623f96249a3ab1424ced59 (patch)
tree97fe4bdf0f2ffb1e35904c1d2111c6e566984d7c /src/Cache.cpp
parentSelect Qt6 in cmake (diff)
downloadnheko-b518f6902e909b22e1623f96249a3ab1424ced59.tar.xz
Make Nheko compile on Qt6
Diffstat (limited to '')
-rw-r--r--src/Cache.cpp15
1 files changed, 2 insertions, 13 deletions
diff --git a/src/Cache.cpp b/src/Cache.cpp

index 44f2ecb0..1c29d530 100644 --- a/src/Cache.cpp +++ b/src/Cache.cpp
@@ -93,11 +93,6 @@ 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>>; -Q_DECLARE_METATYPE(RoomMember) -Q_DECLARE_METATYPE(mtx::responses::Timeline) -Q_DECLARE_METATYPE(RoomInfo) -Q_DECLARE_METATYPE(mtx::responses::QueryKeys) - namespace { std::unique_ptr<Cache> instance_ = nullptr; } @@ -4429,7 +4424,8 @@ Cache::displayName(const QString &room_id, const QString &user_id) static bool isDisplaynameSafe(const std::string &s) { - for (QChar c : QString::fromStdString(s).toStdU32String()) { + for (std::uint32_t cc : QString::fromStdString(s).toStdU32String()) { + auto c = QChar(cc); if (c.isPrint() && !c.isSpace()) return false; } @@ -5293,13 +5289,6 @@ namespace cache { void init(const QString &user_id) { - qRegisterMetaType<RoomMember>(); - qRegisterMetaType<RoomInfo>(); - qRegisterMetaType<QMap<QString, RoomInfo>>(); - qRegisterMetaType<std::map<QString, RoomInfo>>(); - qRegisterMetaType<std::map<QString, mtx::responses::Timeline>>(); - qRegisterMetaType<mtx::responses::QueryKeys>(); - instance_ = std::make_unique<Cache>(user_id); }