Core: PatchTool code cosmetics

Some more FilePath use, QLatin*, static, ...

Also fix default settings values, amends e2eab0e0 insofar.

Change-Id: I8e40ca9629351db3b3095636b4ea29a204f86da6
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
This commit is contained in:
hjk
2021-08-17 13:37:20 +02:00
parent bd4a501f15
commit 59c01481d1
5 changed files with 33 additions and 38 deletions

View File

@@ -119,7 +119,7 @@ public:
m_ui.patchChooser->setToolTip(patchToolTip);
m_ui.patchChooser->setExpectedKind(PathChooser::ExistingCommand);
m_ui.patchChooser->setHistoryCompleter(QLatin1String("General.PatchCommand.History"));
m_ui.patchChooser->setPath(PatchTool::patchCommand());
m_ui.patchChooser->setFilePath(PatchTool::patchCommand());
m_ui.autoSaveCheckBox->setChecked(EditorManagerPrivate::autoSaveEnabled());
m_ui.autoSaveCheckBox->setToolTip(tr("Automatically creates temporary copies of "
"modified files. If %1 is restarted after "
@@ -265,7 +265,7 @@ void SystemSettingsWidget::apply()
m_ui.externalFileBrowserEdit->text());
}
}
PatchTool::setPatchCommand(m_ui.patchChooser->filePath().toString());
PatchTool::setPatchCommand(m_ui.patchChooser->filePath());
EditorManagerPrivate::setAutoSaveEnabled(m_ui.autoSaveCheckBox->isChecked());
EditorManagerPrivate::setAutoSaveInterval(m_ui.autoSaveInterval->value());
EditorManagerPrivate::setAutoSuspendEnabled(m_ui.autoSuspendCheckBox->isChecked());