refactor: make Application::imageUploader private

This commit is contained in:
Rasmus Karlsson 2024-01-18 23:42:15 +01:00
parent 51cfb8d369
commit 7629190589
3 changed files with 11 additions and 8 deletions

View file

@ -405,6 +405,13 @@ IChatterinoBadges *Application::getChatterinoBadges()
return this->chatterinoBadges.get();
}
ImageUploader *Application::getImageUploader()
{
assertInGuiThread();
return this->imageUploader;
}
ITwitchIrcServer *Application::getTwitch()
{
assertInGuiThread();

View file

@ -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();

View file

@ -427,7 +427,8 @@ Split::Split(QWidget *parent)
}
}
QPointer<ResizingTextEdit> edit = this->input_->ui_.textEdit;
getApp()->imageUploader->upload(source, this->getChannel(), edit);
getIApp()->getImageUploader()->upload(source, this->getChannel(),
edit);
});
getSettings()->imageUploaderEnabled.connect(