refactor: Remove most raw accesses into Application (#5104)

This commit is contained in:
pajlada
2024-01-19 17:59:55 +01:00
committed by GitHub
parent 326a402710
commit 4380ef8c5f
82 changed files with 552 additions and 452 deletions
+5 -4
View File
@@ -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_);