Bug 468476 - KCM doesn't show name of third party theme if it uses metadata.json instead of metadata.desktop
Summary: KCM doesn't show name of third party theme if it uses metadata.json instead o...
Status: RESOLVED NOT A BUG
Alias: None
Product: systemsettings
Classification: Applications
Component: kcm_desktoptheme (show other bugs)
Version: 5.27.0
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Alexander Lohnau
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-04-13 17:46 UTC by Thiago Sueto
Modified: 2023-04-14 08:21 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thiago Sueto 2023-04-13 17:46:32 UTC
Very easy to reproduce:

Create a file ~/.local/share/plasma/desktopthemes/electrostorm/metadata.json with the following contents:


{
    "KPlugin": {
        "Authors": [
            {
                "Name": "A Plasma Theme Designer",
                "Email": "my@mail.address",
            }
        ],
        "Name": "Electrostorm",
        "Description": "Brings a very dynamic electrical energy atmosphere to the desktop",
        "Id": "electrostorm",
        "Version": "0.1",
        "Category": "",
        "EnabledByDefault": true,
        "License": "GPL",
        "Website": ""
    },
    "X-Plasma-API": "5.0"
}


It will show up with an empty name in System Settings -> Appearance -> Plasma Style. You don't even need any other file to reproduce.

The equivalent metadata.desktop shows up correctly:


[Desktop Entry]
Name=Electrostorm
Comment=Brings a very dynamic electrical energy atmosphere to the desktop

X-KDE-PluginInfo-Author=A Plasma Theme Designer
X-KDE-PluginInfo-Email=my@mail.address
X-KDE-PluginInfo-Name=electrostorm
X-KDE-PluginInfo-Version=0.1
X-KDE-PluginInfo-Website=
X-KDE-PluginInfo-License=GPL
X-Plasma-API=5.0
Comment 1 Alexander Lohnau 2023-04-14 07:54:00 UTC
            {
                "Name": "A Plasma Theme Designer",
                "Email": "my@mail.address",
            }


The Email should not have a trailing comma

>Create a file ~/.local/share/plasma/desktopthemes/electrostorm/metadata.json with the following contents:
~/.local/share/plasma/desktoptheme/electrostorm/metadata.json would be the correct path
Comment 2 Alexander Lohnau 2023-04-14 08:13:42 UTC
On the command line, you can see the following error:
kf.coreaddons: error parsing "/home/user/.local/share/plasma/desktoptheme/electrostorm/metadata.json" "object is missing after a comma"