Bug 517898 - Look-and-feel defaults file [KSplash] section is never read — format mismatch with code
Summary: Look-and-feel defaults file [KSplash] section is never read — format mismatch...
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Global Theme packages (other bugs)
Version First Reported In: 6.6.3
Platform: Ubuntu Linux
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks: 520505
  Show dependency treegraph
 
Reported: 2026-03-20 14:37 UTC by Erich Eickmeyer
Modified: 2026-06-29 16:32 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In: 6.6.6
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Erich Eickmeyer 2026-03-20 14:37:19 UTC
The [KSplash] section in look-and-feel theme contents/defaults files uses a flat group name, but the code in libklookandfeel/klookandfeelmanager.cpp reads it as a nested [ksplashrc][KSplash] config group. This means the Theme entry under [KSplash] is silently ignored.

Code reference (klookandfeelmanager.cpp, save() method):

```
if (itemsToApply.testFlag(SplashScreen)) {
    group = KConfigGroup(conf, u"ksplashrc"_s);
    group = KConfigGroup(&group, u"KSplash"_s);
    QString splashScreen = (group.readEntry("Theme", QString()));
    if (!splashScreen.isEmpty()) {
        setSplashScreen(splashScreen);
    } else {
        setSplashScreen(packageId);
    }
}
```

The code navigates ksplashrc → KSplash as nested groups, which expects the defaults file format [ksplashrc][KSplash]. However, the upstream Breeze themes all use the flat format [KSplash]:

```
[KSplash]
Theme=org.kde.Breeze
```

This entry is never actually read. Breeze still works because the else fallback calls setSplashScreen(packageId), which sets the splash theme to the package's own plugin ID.

Impact: Any look-and-feel theme that wants to reference a different theme's splash screen (e.g., a dark variant pointing to the main theme's splash) cannot do so via the defaults file. The [KSplash] Theme=... value is dead config.

Additionally, the SplashScreen content flag is only set when the theme has its own splashmainscript (Splash.qml):

This means the entire [KSplash] block is gated behind the theme having its own splash content, even though the intent is to reference another theme's splash.

Steps to reproduce:

- Create a look-and-feel theme without its own contents/splash/Splash.qml
- Add [KSplash]\nTheme=org.kde.Breeze to its contents/defaults
- Apply the theme via System Settings → Global Theme
- Check ~/.config/ksplashrc — the KSplash theme is not updated
- Expected: The splash theme from defaults is applied to ksplashrc.

Actual: The [KSplash] entry is ignored due to both the format mismatch and the SplashScreen flag gating.

Suggested fix: Either:

- Change the defaults file format to [ksplashrc][KSplash] in Breeze (matching what the code reads), or
- Change the code to read [KSplash] as a flat group (matching the current defaults files)
- And decouple the SplashScreen content flag from requiring splashmainscript when the defaults file specifies a Theme entry.

Affects: Plasma 6.x (verified against current master branch of plasma-workspace)
Comment 1 Erich Eickmeyer 2026-03-20 14:46:25 UTC
Slight addition to the above (was missing part of my markdown):
---

Additionally, the SplashScreen content flag is only set when the theme has its own splashmainscript (Splash.qml):

```
contents.setFlag(SplashScreen, !pkg.filePath("splashmainscript").isEmpty());
```
Comment 2 Nate Graham 2026-06-29 16:32:37 UTC
In https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/6579, we changed all the default global theme packages to use the non-flat/nested config style, effectively implementing option 1. This fix has been backported to the Plasma 6.6 branch, so it should show up in Plasma 6.6.6.

CCing Filip in case there's anything more than might need to be done here!