chore: remove Singleton & replace getIApp with getApp (#5514)

This commit is contained in:
pajlada
2024-07-21 15:09:59 +02:00
committed by GitHub
parent 21186df058
commit 5deec1f02f
145 changed files with 802 additions and 856 deletions
+4 -4
View File
@@ -57,7 +57,7 @@ SettingsDialog::SettingsDialog(QWidget *parent)
this->overrideBackgroundColor_ = QColor("#111111");
this->addShortcuts();
this->signalHolder_.managedConnect(getIApp()->getHotkeys()->onItemsUpdated,
this->signalHolder_.managedConnect(getApp()->getHotkeys()->onItemsUpdated,
[this]() {
this->clearShortcuts();
this->addShortcuts();
@@ -81,13 +81,13 @@ void SettingsDialog::addShortcuts()
{"openTab", nullptr},
};
this->shortcuts_ = getIApp()->getHotkeys()->shortcutsForCategory(
this->shortcuts_ = getApp()->getHotkeys()->shortcutsForCategory(
HotkeyCategory::PopupWindow, actions, this);
}
void SettingsDialog::setSearchPlaceholderText()
{
QString searchHotkey;
auto searchSeq = getIApp()->getHotkeys()->getDisplaySequence(
auto searchSeq = getApp()->getHotkeys()->getDisplaySequence(
HotkeyCategory::PopupWindow, "search");
if (!searchSeq.isEmpty())
{
@@ -434,7 +434,7 @@ void SettingsDialog::onOkClicked()
{
if (!getApp()->getArgs().dontSaveSettings)
{
getIApp()->getCommands()->save();
getApp()->getCommands()->save();
pajlada::Settings::SettingManager::gSave();
}
this->close();