You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
749 B
23 lines
749 B
#include <KColorScheme> |
|
#include <KConfig> |
|
#include <KConfigGroup> |
|
|
|
#include <QDebug> |
|
|
|
int main() |
|
{ |
|
KConfig globals("kdeglobals"); |
|
KConfigGroup general(&globals, "General"); |
|
if (general.readEntry("ColorScheme") != QLatin1String("Breeze")) { |
|
return 0; |
|
} |
|
QString breezeLightPath = QStandardPaths::locate(QStandardPaths::GenericDataLocation, QStringLiteral("color-schemes/BreezeLight.colors")); |
|
if (breezeLightPath.isEmpty()) { |
|
return 0; |
|
} |
|
KConfig breezeLight(breezeLightPath, KConfig::SimpleConfig); |
|
for (const auto &group : breezeLight.groupList()) { |
|
auto destination = KConfigGroup(&globals, group); |
|
KConfigGroup(&breezeLight, group).copyTo(&destination, KConfig::Notify); |
|
} |
|
}
|
|
|