kcontrol: use KToolInvocation::startProgram() to execute programs

because the programs do not have valid service files (autostart)

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
Ivailo Monev 2024-05-13 04:25:11 +03:00
parent e7f9852d5f
commit b364dfb73e
6 changed files with 7 additions and 7 deletions

View file

@ -672,7 +672,7 @@ void KAccessConfig::save()
// make kaccess reread the configuration // make kaccess reread the configuration
// turning a11y features off needs to be done by kaccess // turning a11y features off needs to be done by kaccess
// so run it to clear any enabled features and it will exit if it should // so run it to clear any enabled features and it will exit if it should
KToolInvocation::self()->startServiceByStorageId("kaccess"); KToolInvocation::self()->startProgram("kaccess");
emit changed(false); emit changed(false);
} }

View file

@ -1162,7 +1162,7 @@ void KColorCm::save()
displayGroup.writeEntry("exportKDEColors", applyToAlien->isChecked()); displayGroup.writeEntry("exportKDEColors", applyToAlien->isChecked());
cfg.sync(); cfg.sync();
KToolInvocation::self()->startServiceByStorageId("krdb"); KToolInvocation::self()->startProgram("krdb");
emit changed(false); emit changed(false);
} }

View file

@ -270,7 +270,7 @@ bool FontAASettings::load()
xft.apply(); // Save this setting xft.apply(); // Save this setting
KConfigGroup(&kglobals, "General").writeEntry("XftHintStyle", KXftConfig::toStr(hStyle)); KConfigGroup(&kglobals, "General").writeEntry("XftHintStyle", KXftConfig::toStr(hStyle));
kglobals.sync(); kglobals.sync();
KToolInvocation::self()->startServiceByStorageId("krdb"); KToolInvocation::self()->startProgram("krdb");
} }
hintingStyle->setCurrentIndex(getIndex(hStyle)); hintingStyle->setCurrentIndex(getIndex(hStyle));
@ -731,7 +731,7 @@ void KFonts::save()
} }
#endif #endif
#endif #endif
KToolInvocation::self()->startServiceByStorageId("krdb"); KToolInvocation::self()->startProgram("krdb");
emit changed(false); emit changed(false);
} }

View file

@ -551,7 +551,7 @@ void MouseConfig::save()
group.writeEntry("MKCurve", mk_curve->value()); group.writeEntry("MKCurve", mk_curve->value());
// restart kaccess // restart kaccess
KToolInvocation::self()->startServiceByStorageId("kaccess"); KToolInvocation::self()->startProgram("kaccess");
emit changed(false); emit changed(false);
} }

View file

@ -257,7 +257,7 @@ bool ThemePage::applyTheme(const CursorTheme *theme, const int size)
KToolInvocation::self()->setLaunchEnv("XCURSOR_THEME", theme->name()); KToolInvocation::self()->setLaunchEnv("XCURSOR_THEME", theme->name());
// Update the Xcursor X resources // Update the Xcursor X resources
KToolInvocation::self()->startServiceByStorageId("krdb"); KToolInvocation::self()->startProgram("krdb");
// Notify all applications that the cursor theme has changed // Notify all applications that the cursor theme has changed
KGlobalSettings::self()->emitChange(KGlobalSettings::MouseChanged); KGlobalSettings::self()->emitChange(KGlobalSettings::MouseChanged);

View file

@ -389,7 +389,7 @@ void KCMStyle::save()
// export fonts/colors settings. // export fonts/colors settings.
if (m_bStyleDirty | m_bToolbarDirty) // Export only if necessary if (m_bStyleDirty | m_bToolbarDirty) // Export only if necessary
{ {
KToolInvocation::self()->startServiceByStorageId("krdb"); KToolInvocation::self()->startProgram("krdb");
} }
// Clean up // Clean up