Commit bc8b9cc5 authored by David Redondo's avatar David Redondo 🏎 Committed by Nate Graham
Browse files

Update users that have Breeze as colorscheme to BreezeLight

This is something that @teams/vdg wants to do since BreezeLight
is the new default color scheme.
BUG:432470


(cherry picked from commit 960ad385)
parent 1a5aee11
add_subdirectory(qtcurvepreset)
add_subdirectory(kde4breeze)
add_subdirectory(breezetobreezelight)
find_package(KF5ConfigWidgets REQUIRED)
add_executable(breezetobreezelight main.cpp)
target_link_libraries(breezetobreezelight KF5::ConfigWidgets)
install(TARGETS breezetobreezelight DESTINATION ${KDE_INSTALL_LIBDIR}/kconf_update_bin/)
install(FILES breezetobreezelight.upd DESTINATION ${KDE_INSTALL_KCONFUPDATEDIR})
Version=5
Id=BreezeToBreezeLight
Script=breezetobreezelight
#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);
}
}
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