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/GridImagePackModel.cpp | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'src/GridImagePackModel.cpp') diff --git a/src/GridImagePackModel.cpp b/src/GridImagePackModel.cpp index bd39405e..4260b6d6 100644 --- a/src/GridImagePackModel.cpp +++ b/src/GridImagePackModel.cpp @@ -13,10 +13,6 @@ #include "Cache_p.h" #include "emoji/Provider.h" -Q_DECLARE_METATYPE(StickerImage) -Q_DECLARE_METATYPE(TextEmoji) -Q_DECLARE_METATYPE(SectionDescription) -Q_DECLARE_METATYPE(QList) QString emoji::categoryToName(emoji::Emoji::Category cat) @@ -73,10 +69,6 @@ GridImagePackModel::GridImagePackModel(const std::string &roomId, bool stickers, , room_id(roomId) , columns(stickers ? 3 : 7) { - [[maybe_unused]] static auto id = qRegisterMetaType(); - [[maybe_unused]] static auto id2 = qRegisterMetaType(); - [[maybe_unused]] static auto id3 = qRegisterMetaType(); - [[maybe_unused]] static auto id4 = qRegisterMetaType>(); if (!stickers) { for (const auto &category : { @@ -144,7 +136,7 @@ GridImagePackModel::GridImagePackModel(const std::string &roomId, bool stickers, finder.toNextBoundary(); auto end = finder.position(); - auto ref = str.midRef(start, end - start).trimmed(); + auto ref = QStringView(str).mid(start, end - start).trimmed(); if (!ref.isEmpty()) trie_.insert(ref.toUcs4(), id); } while (finder.position() < str.size()); -- cgit 1.5.1