diff --git a/src/providers/ffz/ffzemotes.cpp b/src/providers/ffz/ffzemotes.cpp index a0b437a8e..a4f80097a 100644 --- a/src/providers/ffz/ffzemotes.cpp +++ b/src/providers/ffz/ffzemotes.cpp @@ -54,7 +54,7 @@ void FFZEmotes::loadGlobalEmotes() req.getJSON([this](QJsonObject &root) { auto sets = root.value("sets").toObject(); - std::vector codes; + std::vector codes; for (const QJsonValue &set : sets) { auto emoticons = set.toObject().value("emoticons").toArray(); @@ -71,7 +71,7 @@ void FFZEmotes::loadGlobalEmotes() QString("https://www.frankerfacez.com/emoticon/%1-%2").arg(id).arg(code); this->globalEmotes.insert(code, emoteData); - codes.push_back(code.toStdString()); + codes.push_back(code); } this->globalEmoteCodes = codes; @@ -99,7 +99,7 @@ void FFZEmotes::loadChannelEmotes(const QString &channelName, std::weak_ptr codes; + std::vector codes; for (const QJsonValue &setNode : setsNode) { auto emotesNode = setNode.toObject().value("emoticons").toArray(); @@ -123,10 +123,10 @@ void FFZEmotes::loadChannelEmotes(const QString &channelName, std::weak_ptrchannelEmotes.insert(code, emote); map->insert(code, emote); - codes.push_back(code.toStdString()); + codes.push_back(code); } - this->channelEmoteCodes[channelName.toStdString()] = codes; + this->channelEmoteCodes[channelName] = codes; } }); } diff --git a/src/providers/ffz/ffzemotes.hpp b/src/providers/ffz/ffzemotes.hpp index 8c2247a21..7a8e45ad6 100644 --- a/src/providers/ffz/ffzemotes.hpp +++ b/src/providers/ffz/ffzemotes.hpp @@ -14,10 +14,10 @@ class FFZEmotes { public: util::EmoteMap globalEmotes; - SignalVector globalEmoteCodes; + SignalVector globalEmoteCodes; util::EmoteMap channelEmotes; - std::map> channelEmoteCodes; + std::map> channelEmoteCodes; void loadGlobalEmotes(); void loadChannelEmotes(const QString &channelName, diff --git a/src/util/completionmodel.cpp b/src/util/completionmodel.cpp index 0f899446e..25ab891ea 100644 --- a/src/util/completionmodel.cpp +++ b/src/util/completionmodel.cpp @@ -38,7 +38,7 @@ void CompletionModel::refresh() } // Global: FFZ Global Emotes - std::vector &ffzGlobalEmoteCodes = app->emotes->ffz.globalEmoteCodes; + std::vector &ffzGlobalEmoteCodes = app->emotes->ffz.globalEmoteCodes; for (const auto &m : ffzGlobalEmoteCodes) { this->addString(m, TaggedString::Type::FFZGlobalEmote); } @@ -51,8 +51,8 @@ void CompletionModel::refresh() } // Channel-specific: FFZ Channel Emotes - std::vector &ffzChannelEmoteCodes = - app->emotes->ffz.channelEmoteCodes[this->channelName.toStdString()]; + std::vector &ffzChannelEmoteCodes = + app->emotes->ffz.channelEmoteCodes[this->channelName]; for (const auto &m : ffzChannelEmoteCodes) { this->addString(m, TaggedString::Type::FFZChannelEmote); }