refactor: Remove most raw accesses into Application (#5104)
This commit is contained in:
@@ -54,7 +54,7 @@ SettingsDialog::SettingsDialog(QWidget *parent)
|
||||
this->overrideBackgroundColor_ = QColor("#111111");
|
||||
|
||||
this->addShortcuts();
|
||||
this->signalHolder_.managedConnect(getApp()->hotkeys->onItemsUpdated,
|
||||
this->signalHolder_.managedConnect(getIApp()->getHotkeys()->onItemsUpdated,
|
||||
[this]() {
|
||||
this->clearShortcuts();
|
||||
this->addShortcuts();
|
||||
@@ -78,13 +78,13 @@ void SettingsDialog::addShortcuts()
|
||||
{"openTab", nullptr},
|
||||
};
|
||||
|
||||
this->shortcuts_ = getApp()->hotkeys->shortcutsForCategory(
|
||||
this->shortcuts_ = getIApp()->getHotkeys()->shortcutsForCategory(
|
||||
HotkeyCategory::PopupWindow, actions, this);
|
||||
}
|
||||
void SettingsDialog::setSearchPlaceholderText()
|
||||
{
|
||||
QString searchHotkey;
|
||||
auto searchSeq = getApp()->hotkeys->getDisplaySequence(
|
||||
auto searchSeq = getIApp()->getHotkeys()->getDisplaySequence(
|
||||
HotkeyCategory::PopupWindow, "search");
|
||||
if (!searchSeq.isEmpty())
|
||||
{
|
||||
@@ -432,7 +432,7 @@ void SettingsDialog::onOkClicked()
|
||||
{
|
||||
if (!getApp()->getArgs().dontSaveSettings)
|
||||
{
|
||||
getApp()->commands->save();
|
||||
getIApp()->getCommands()->save();
|
||||
pajlada::Settings::SettingManager::gSave();
|
||||
}
|
||||
this->close();
|
||||
|
||||
Reference in New Issue
Block a user