Commit 03bed527 authored by David Redondo's avatar David Redondo 🏎

Read the global color scheme name from its file

Adds the same fix as in kde/kate!46. KColorSchemeManager operates on the user
visible Scheme names. They can generally differ from the names of the *.colors
files which are saved in kdeglobals. To correctly select the global active scheme
we have to read the name from the file.
parent be95a7bb
......@@ -78,7 +78,12 @@ QString ColorSchemeChooser::currentDesktopDefaultScheme() const
KSharedConfigPtr config = KSharedConfig::openConfig(QStringLiteral("kdeglobals"));
KConfigGroup group(config, "General");
return group.readEntry("ColorScheme", QStringLiteral("Breeze"));
const QString scheme = group.readEntry("ColorScheme", QStringLiteral("Breeze"));
const QString path = QStandardPaths::locate(QStandardPaths::GenericDataLocation,
KSharedConfigPtr schemeFile = KSharedConfig::openConfig(path, KConfig::SimpleConfig);
const QString name = KConfigGroup(schemeFile, "General").readEntry("Name", scheme);
return name;
QString ColorSchemeChooser::currentSchemeName() const
Markdown is supported
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