lookandfeelmanager: Write colors before color scheme

While we indeed write both with KConfig::Notify flag interested
processes might only listen to the scheme change instead of
every color scheme group. When they react to the scheme change
the colors have not yet changed.
The colors kcm also does it in this order.
BUG:421745
FIXED-IN:5.24.7
wilder-5.26
David Redondo 4 years ago
parent e0a515655c
commit 9a77503f0b
  1. 3
      kcms/lookandfeel/lookandfeelmanager.cpp

@ -190,12 +190,13 @@ void LookAndFeelManager::setColors(const QString &scheme, const QString &colorFi
KConfig configDefault(configDefaults(QStringLiteral("kdeglobals")));
auto kdeGlobalsCfg = KSharedConfig::openConfig(QStringLiteral("kdeglobals"), KConfig::FullConfig);
writeNewDefaults(*kdeGlobalsCfg, configDefault, QStringLiteral("General"), QStringLiteral("ColorScheme"), scheme, KConfig::Notify);
if (m_mode == Mode::Apply) {
applyScheme(colorFile, kdeGlobalsCfg.data(), KConfig::Notify);
}
writeNewDefaults(*kdeGlobalsCfg, configDefault, QStringLiteral("General"), QStringLiteral("ColorScheme"), scheme, KConfig::Notify);
Q_EMIT colorsChanged();
}

Loading…
Cancel
Save