[network/kio-extras/release/26.08] kcms/trash: kcmtrash.cpp: fix trash settings not detecting multiple mounts

Méven Car <[email protected]>
Newsgroups gmane.comp.kde.cvs
Message-ID <[email protected]>
Git commit 8344b3cc7c455c9cd98012b13e3506a52571d9bb by Méven Car.
Committed on 09/08/2026 at 07:16.
Pushed by meven into branch 'release/26.08'.

kcmtrash.cpp: fix trash settings not detecting multiple mounts

BUG: 469598


(cherry picked from commit be77f51bfb2ffc9a5bc6693f25c55e5b845bb5ed)

Co-authored-by: Antti Savolainen <[email protected]>

M  +2    -2    kcms/trash/kcmtrash.cpp
M  +1    -1    kcms/trash/kcmtrash.h

https://invent.kde.org/network/kio-extras/-/commit/8344b3cc7c455c9cd98012b13e3506a52571d9bb

diff --git a/kcms/trash/kcmtrash.cpp b/kcms/trash/kcmtrash.cpp
index 9c8dbb59a..eeb98b572 100644
--- a/kcms/trash/kcmtrash.cpp
+++ b/kcms/trash/kcmtrash.cpp
@@ -47,7 +47,7 @@ TrashConfigModule::TrashConfigModule(QObject *parent, const KPluginMetaData &dat
         auto doc = QJsonDocument::fromJson(job->metaData().value(QStringLiteral("TRASH_DIRECTORIES")).toLocal8Bit());
         const auto map = doc.object().toVariantMap();
         for (auto it = map.begin(); it != map.end(); it++) {
-            m_trashMap.insert(it.key().toInt(), it.value().toString());
+            m_trashMap.insert(it.key().toUInt(), it.value().toString());
         }
         setupGui();
         trashChanged(0);
@@ -217,7 +217,7 @@ void TrashConfigModule::setupGui()
         QListWidget *mountPoints = new QListWidget(widget());
         layout->addWidget(mountPoints);
 
-        QMapIterator<int, QString> it(m_trashMap);
+        QMapIterator<uint, QString> it(m_trashMap);
         while (it.hasNext()) {
             it.next();
 
diff --git a/kcms/trash/kcmtrash.h b/kcms/trash/kcmtrash.h
index 17c957842..13287d3e2 100644
--- a/kcms/trash/kcmtrash.h
+++ b/kcms/trash/kcmtrash.h
@@ -61,7 +61,7 @@ private:
 
     typedef QMap<QString, ConfigEntry> ConfigMap;
     ConfigMap mConfigMap;
-    QMap<int, QString> m_trashMap;
+    QMap<uint, QString> m_trashMap;
 };
 
 #endif // KCMTRASH_H
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.