diff --git a/src/Application.cpp b/src/Application.cpp index c4d820313..28165b3fa 100644 --- a/src/Application.cpp +++ b/src/Application.cpp @@ -405,6 +405,13 @@ IChatterinoBadges *Application::getChatterinoBadges() return this->chatterinoBadges.get(); } +ImageUploader *Application::getImageUploader() +{ + assertInGuiThread(); + + return this->imageUploader; +} + ITwitchIrcServer *Application::getTwitch() { assertInGuiThread(); diff --git a/src/Application.hpp b/src/Application.hpp index 10ce3b217..a9258eb44 100644 --- a/src/Application.hpp +++ b/src/Application.hpp @@ -134,9 +134,9 @@ private: HotkeyController *const hotkeys{}; WindowManager *const windows{}; Toasts *const toasts{}; + ImageUploader *const imageUploader{}; public: - ImageUploader *const imageUploader{}; SeventvAPI *const seventvAPI{}; CrashHandler *const crashHandler{}; @@ -210,12 +210,7 @@ public: ITwitchLiveController *getTwitchLiveController() override; TwitchBadges *getTwitchBadges() override; IChatterinoBadges *getChatterinoBadges() override; - ImageUploader *getImageUploader() override - { - assertInGuiThread(); - - return this->imageUploader; - } + ImageUploader *getImageUploader() override; SeventvAPI *getSeventvAPI() override { assertInGuiThread(); diff --git a/src/widgets/splits/Split.cpp b/src/widgets/splits/Split.cpp index 48cc812e7..78e683d7a 100644 --- a/src/widgets/splits/Split.cpp +++ b/src/widgets/splits/Split.cpp @@ -427,7 +427,8 @@ Split::Split(QWidget *parent) } } QPointer edit = this->input_->ui_.textEdit; - getApp()->imageUploader->upload(source, this->getChannel(), edit); + getIApp()->getImageUploader()->upload(source, this->getChannel(), + edit); }); getSettings()->imageUploaderEnabled.connect(