fix: cleanly exit on shutdown (#5537)

Co-authored-by: Mm2PL <mm2pl+gh@kotmisia.pl>
Co-authored-by: Nerixyz <nerixdev@outlook.de>
This commit is contained in:
pajlada
2024-08-10 14:24:25 +02:00
committed by GitHub
parent daff83dde8
commit 74d65a345d
23 changed files with 134 additions and 65 deletions
+2 -36
View File
@@ -196,42 +196,6 @@ Application::~Application()
Application::instance = nullptr;
}
void Application::fakeDtor()
{
#ifdef CHATTERINO_HAVE_PLUGINS
this->plugins.reset();
#endif
this->twitchPubSub.reset();
this->twitchBadges.reset();
this->twitchLiveController.reset();
this->chatterinoBadges.reset();
// this->bttvLiveUpdates.reset();
this->bttvEmotes.reset();
this->ffzEmotes.reset();
// this->seventvEventAPI.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->streamerMode.reset();
}
void Application::initialize(Settings &settings, const Paths &paths)
{
assert(isAppInitialized == false);
@@ -316,6 +280,8 @@ void Application::initialize(Settings &settings, const Paths &paths)
this->initBttvLiveUpdates();
this->initSeventvEventAPI();
this->streamerMode->start();
}
int Application::run(QApplication &qtApp)