[system/kconfigeditor] src: Don't crash when app has no appdata_name

Nicolas Fella <[email protected]>
Newsgroups gmane.comp.kde.cvs
Message-ID <[email protected]>
Git commit 69635dbd23c3fd3b0e626855c4f102ec13c0f602 by Nicolas Fella.
Committed on 22/07/2026 at 11:07.
Pushed by nicolasfella into branch 'master'.

Don't crash when app has no appdata_name

M  +3    -1    src/appsmodel.rs

https://invent.kde.org/system/kconfigeditor/-/commit/69635dbd23c3fd3b0e626855c4f102ec13c0f602

diff --git a/src/appsmodel.rs b/src/appsmodel.rs
index f0bae47..ca077e9 100644
--- a/src/appsmodel.rs
+++ b/src/appsmodel.rs
@@ -97,9 +97,11 @@ impl Default for AppsModelRust {
                 location.push(r.deploy_dir().unwrap());
                 location.push("files");
 
+                let name: String = r.appdata_name().or(r.name()).unwrap().into();
+
                 apps.push(App {
                     id: r.name().unwrap().into(),
-                    name: r.appdata_name().unwrap().into(),
+                    name: name,
                     location: location.into_os_string().into_string().unwrap(),
                 });
             }
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.