From b518f6902e909b22e1623f96249a3ab1424ced59 Mon Sep 17 00:00:00 2001 From: Nicolas Werner Date: Fri, 2 Jun 2023 00:24:26 +0200 Subject: Make Nheko compile on Qt6 --- src/Cache.cpp | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) (limited to 'src/Cache.cpp') 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>; using Receipts = std::map>; -Q_DECLARE_METATYPE(RoomMember) -Q_DECLARE_METATYPE(mtx::responses::Timeline) -Q_DECLARE_METATYPE(RoomInfo) -Q_DECLARE_METATYPE(mtx::responses::QueryKeys) - namespace { std::unique_ptr 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(); - qRegisterMetaType(); - qRegisterMetaType>(); - qRegisterMetaType>(); - qRegisterMetaType>(); - qRegisterMetaType(); - instance_ = std::make_unique(user_id); } -- cgit 1.5.1