Commit dacb3a8b authored by Cyril Rossi's avatar Cyril Rossi
Browse files

KCM LookAndFeel check if splash screen is provided before applying it.

Summary:
BUG: 414417
* While saving a new global theme, don't set splash screen if none is provided, leave the current one.
* KSplash kcfg set default to breeze instead of the current lnf theme which may not contain a splash screen.

Test Plan:
* Open LookAndFeel KCM, apply Breeze Dark, then open Splash screen KCM, Breeze should be highlighted.
* Open splash screen KCM, select none, click on defaults, Breeze should be selected.

Reviewers: #plasma, ervin, bport, meven, ngraham

Reviewed By: ervin, ngraham

Subscribers: ngraham, plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D28656
parent 17ef374a
......@@ -14,10 +14,7 @@
</entry>
<entry name="theme" key="Theme" type="String">
<label>Name of the current splash theme</label>
<code>KConfigGroup cg(KSharedConfig::openConfig(QStringLiteral("kdeglobals")), "KDE");
QString defaultTheme = cg.readEntry("LookAndFeelPackage", QStringLiteral("org.kde.breeze.desktop"));
</code>
<default code="true">defaultTheme</default>
<default>org.kde.breeze.desktop</default>
</entry>
</group>
</kcfg>
......@@ -398,7 +398,10 @@ void KCMLookandFeel::save()
}
//TODO: option to enable/disable apply? they don't seem required by UI design
setSplashScreen(m_settings->lookAndFeelPackage());
const auto *item = m_model->item(pluginIndex(m_settings->lookAndFeelPackage()));
if (item->data(HasSplashRole).toBool()) {
setSplashScreen(m_settings->lookAndFeelPackage());
}
setLockScreen(m_settings->lookAndFeelPackage());
m_configGroup.sync();
......
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