Skip to content

Commit

Permalink
Apply patch from pajlada.
Browse files Browse the repository at this point in the history
  • Loading branch information
DeltaTimo committed Sep 1, 2024
1 parent 612fda7 commit 3cedf4e
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 47 deletions.
1 change: 1 addition & 0 deletions benchmarks/src/RecentMessages.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include "providers/chatterino/ChatterinoBadges.hpp"
#include "providers/ffz/FfzBadges.hpp"
#include "providers/ffz/FfzEmotes.hpp"
#include "providers/pronouns/Pronouns.hpp"
#include "providers/recentmessages/Impl.hpp"
#include "providers/seventv/SeventvBadges.hpp"
#include "providers/seventv/SeventvEmotes.hpp"
Expand Down
30 changes: 0 additions & 30 deletions src/Application.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -187,36 +187,6 @@ Application::Application(Settings &_settings, const Paths &paths,

Application::~Application()
{
#ifdef CHATTERINO_HAVE_PLUGINS
this->plugins.reset();
#endif
this->twitchPubSub.reset();
this->twitchBadges.reset();
this->twitchLiveController.reset();
this->chatterinoBadges.reset();
this->bttvEmotes.reset();
this->ffzEmotes.reset();
this->seventvEmotes.reset();
this->notifications.reset();
this->commands.reset();
// If a crash happens after crashHandler has been reset, we'll assert
// This isn't super different from before, where if the app is already killed, the getApp() portion of it is already dead
this->crashHandler.reset();
this->seventvAPI.reset();
this->highlights.reset();
this->seventvBadges.reset();
this->ffzBadges.reset();
// this->twitch.reset();
this->imageUploader.reset();
this->hotkeys.reset();
this->fonts.reset();
this->sound.reset();
this->userData.reset();
this->toasts.reset();
this->accounts.reset();
this->emotes.reset();
this->themes.reset();
this->pronouns.reset();
// we do this early to ensure getApp isn't used in any dtors
INSTANCE = nullptr;
}
Expand Down
6 changes: 3 additions & 3 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -348,12 +348,12 @@ set(SOURCE_FILES
providers/liveupdates/BasicPubSubManager.hpp
providers/liveupdates/BasicPubSubWebsocket.hpp

providers/pronouns/Pronouns.hpp
providers/pronouns/Pronouns.cpp
providers/pronouns/UserPronouns.hpp
providers/pronouns/Pronouns.hpp
providers/pronouns/UserPronouns.cpp
providers/pronouns/alejo/PronounsAlejoApi.hpp
providers/pronouns/UserPronouns.hpp
providers/pronouns/alejo/PronounsAlejoApi.cpp
providers/pronouns/alejo/PronounsAlejoApi.hpp

providers/recentmessages/Api.cpp
providers/recentmessages/Api.hpp
Expand Down
2 changes: 1 addition & 1 deletion src/providers/pronouns/alejo/PronounsAlejoApi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ void AlejoApi::fetch(const QString &username,
return;
}
qCWarning(chatterinoPronouns)
<< "alejo.io returned " << status
<< "alejo.io returned " << status.value_or(-1)
<< " when fetching pronouns for " << username;
onDone({});
})
Expand Down
6 changes: 0 additions & 6 deletions tests/src/InputCompletion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,18 +69,12 @@ class MockApplication : public mock::BaseApplication
return &this->seventvEmotes;
}

pronouns::Pronouns *getPronouns() override
{
return &this->pronouns;
}

AccountController accounts;
mock::MockTwitchIrcServer twitch;
Emotes emotes;
BttvEmotes bttvEmotes;
FfzEmotes ffzEmotes;
SeventvEmotes seventvEmotes;
pronouns::Pronouns pronouns;
};

} // namespace
Expand Down
7 changes: 0 additions & 7 deletions tests/src/MessageBuilder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,6 @@ class MockApplication : public mock::BaseApplication
return &this->seventvEmotes;
}

pronouns::Pronouns *getPronouns() override
{
return &this->pronouns;
}

Settings settings;
AccountController accounts;
Emotes emotes;
mock::UserDataController userData;
Expand All @@ -108,7 +102,6 @@ class MockApplication : public mock::BaseApplication
BttvEmotes bttvEmotes;
FfzEmotes ffzEmotes;
SeventvEmotes seventvEmotes;
pronouns::Pronouns pronouns;
};

} // namespace
Expand Down

0 comments on commit 3cedf4e

Please sign in to comment.