refactor: Remove most raw accesses into Application (#5104)
This commit is contained in:
@@ -111,7 +111,7 @@ void Fonts::initialize(Settings &, const Paths &)
|
||||
assertInGuiThread();
|
||||
|
||||
// REMOVED
|
||||
getApp()->windows->incGeneration();
|
||||
getIApp()->getWindows()->incGeneration();
|
||||
|
||||
for (auto &map : this->fontsByType_)
|
||||
{
|
||||
|
||||
@@ -121,7 +121,7 @@ WindowManager::WindowManager(const Paths &paths)
|
||||
this->saveTimer->setSingleShot(true);
|
||||
|
||||
QObject::connect(this->saveTimer, &QTimer::timeout, [] {
|
||||
getApp()->windows->save();
|
||||
getIApp()->getWindows()->save();
|
||||
});
|
||||
}
|
||||
|
||||
@@ -346,9 +346,10 @@ void WindowManager::initialize(Settings &settings, const Paths &paths)
|
||||
// We can safely ignore this signal connection since both Themes and WindowManager
|
||||
// share the Application state lifetime
|
||||
// NOTE: APPLICATION_LIFETIME
|
||||
std::ignore = getApp()->themes->repaintVisibleChatWidgets_.connect([this] {
|
||||
this->repaintVisibleChatWidgets();
|
||||
});
|
||||
std::ignore =
|
||||
getIApp()->getThemes()->repaintVisibleChatWidgets_.connect([this] {
|
||||
this->repaintVisibleChatWidgets();
|
||||
});
|
||||
|
||||
assert(!this->initialized_);
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ void GIFTimer::initialize()
|
||||
|
||||
this->position_ += GIF_FRAME_LENGTH;
|
||||
this->signal.invoke();
|
||||
getApp()->windows->repaintGifEmotes();
|
||||
getIApp()->getWindows()->repaintGifEmotes();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user