diff options
| author | Kai Uwe Broulik <[email protected]> | 2026-01-31 11:33:47 +0100 |
|---|---|---|
| committer | Méven Car <[email protected]> | 2026-02-01 05:07:06 +0000 |
| commit | 66b466443db933354c5f3e7aeaa30f754860ec21 (patch) | |
| tree | da0cbe923d1633fd257e2e784ce4a54ac84122b7 /src/kitemviews/kfileitemmodel.cpp | |
| parent | 6789a4fe71df947ded443473fb5f3ae0d4e1f194 (diff) | |
Use currentMimeType for temp file filter
All temporary file types are identified by glob (file extension),
so we don't need to resolve the final mime type here.
The model filter is generic but effectively right now only used
for filtering temp files. Should this change in the future, it
needs to be revisited.
Diffstat (limited to 'src/kitemviews/kfileitemmodel.cpp')
| -rw-r--r-- | src/kitemviews/kfileitemmodel.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/kitemviews/kfileitemmodel.cpp b/src/kitemviews/kfileitemmodel.cpp index 5afcd0fb3..0958e921f 100644 --- a/src/kitemviews/kfileitemmodel.cpp +++ b/src/kitemviews/kfileitemmodel.cpp @@ -1915,7 +1915,8 @@ QHash<QByteArray, QVariant> KFileItemModel::retrieveData(const KFileItem &item, } if (m_requestRole[IsHiddenRole]) { - data.insert(sharedValue("isHidden"), item.isHidden() || item.mimetype() == QStringLiteral("application/x-trash")); + // all "temporary" file types are identified by glob, currentMimeType is therefore enough. + data.insert(sharedValue("isHidden"), item.isHidden() || item.currentMimeType().name() == QStringLiteral("application/x-trash")); } if (m_requestRole[NameRole]) { |
