Skip to content

Commit

Permalink
Remove Emojis.cpp CHATTERINO_TEST ifdefs
Browse files Browse the repository at this point in the history
This was originally required because settings were not
default-initialized before the Emojis tests were ran.

Since #4498 this is no
longer a problem.
  • Loading branch information
pajlada committed Apr 9, 2023
1 parent 5c55f62 commit cd96a9f
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions src/providers/emoji/Emojis.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -216,11 +216,7 @@ void Emojis::sortEmojis()

void Emojis::loadEmojiSet()
{
#ifndef CHATTERINO_TEST
getSettings()->emojiSet.connect([this](const auto &emojiSet) {
#else
const QString emojiSet = "twitter";
#endif
this->emojis.each([=](const auto &name,
std::shared_ptr<EmojiData> &emoji) {
QString emojiSetToUse = emojiSet;
Expand Down Expand Up @@ -265,9 +261,7 @@ void Emojis::loadEmojiSet()
EmoteName{emoji->value}, ImageSet{Image::fromUrl({url}, 0.35)},
Tooltip{":" + emoji->shortCodes[0] + ":<br/>Emoji"}, Url{}});
});
#ifndef CHATTERINO_TEST
});
#endif
}

std::vector<boost::variant<EmotePtr, QString>> Emojis::parse(
Expand Down

0 comments on commit cd96a9f

Please sign in to comment.