Commit 4a64904a authored by Ahmad Samir's avatar Ahmad Samir Committed by Kurt Hindenburg
Browse files

Save the config when setDefaultProfile() is called

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().
parent ca7842a6
......@@ -215,9 +215,6 @@ void ProfileManager::loadAllProfiles(const QString &defaultProfileFileName)
void ProfileManager::saveSettings()
// save default profile
// save shortcuts
......@@ -420,6 +417,8 @@ void ProfileManager::setDefaultProfile(const Profile::Ptr &profile)
_defaultProfile = profile;
// Setting/unsetting a profile as the default is a sort of a
// "profile change", useful for updating the icon/font of the
// "default profile in e.g. 'File -> New Tab' menu.
......@@ -439,6 +438,7 @@ void ProfileManager::saveDefaultProfile()
KSharedConfigPtr appConfig = KSharedConfig::openConfig();
KConfigGroup group = appConfig->group("Desktop Entry");
group.writeEntry("DefaultProfile", QUrl::fromLocalFile(path).fileName());
void ProfileManager::loadShortcuts()
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment