Skip to content

Always save the config when the user accepts the the changes in a config dialog

Ahmad Samir requested to merge work/ahmad/shortcuts-save-config into master

It doesn't seem useful to delay saving to when the the MainWindow destructor calls ProfileManager::saveSettings().

This seems to be fallout from a previous refactor to put all the global settings dialogs in one parent dialog (ConfigurationDialog), because now nothing actually calls ProfileSettings::slotAccepted().


Optimise saving profile shortcuts

  • Call ProfileSettings::slotAccepted() when the parent ConfigurationDialog is accepted, so that ProfileManager::saveSettings() is called
  • don't delete the ProfileSettings dialog on accept, it'll be destroyed when the parent ConfigurationDialog is destroyed
  • save the profiles' shorcuts if they were actually changed

With this commit and the previous one, there is no need for ~Part() or ~Application() to call saveSettings(), shorcuts settings are saved when the ProfileSettings dialog is accepted and saving the default profile is done in setDefaultProfile(). This fixes an issue where changing e.g. the default profile is only saved to the konsolerc file when the main window is closed.

Edited by Ahmad Samir

Merge request reports