diff options
| author | Luc Schrijvers <[email protected]> | 2025-08-19 14:50:06 +0200 |
|---|---|---|
| committer | Méven Car <[email protected]> | 2025-08-19 12:50:06 +0000 |
| commit | 31f6db24024c40156dcdf67bc1476d0283bf97c4 (patch) | |
| tree | 52c0d59c9aa39a2e9e24fe1d47175585ad2fb263 /src/views/dolphinview.cpp | |
| parent | 361a65d3fd3f3da217748b845875d4de3464e9a5 (diff) | |
dolphinview: use QString::slice with Qt > 6.8
QString::slice is preferable when available, as it does not allocate.
Amends db92361e10f356ed0d1bf2dc7ea3453086ce876c
Diffstat (limited to 'src/views/dolphinview.cpp')
| -rw-r--r-- | src/views/dolphinview.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/views/dolphinview.cpp b/src/views/dolphinview.cpp index e81b3b121..1ed857851 100644 --- a/src/views/dolphinview.cpp +++ b/src/views/dolphinview.cpp @@ -2247,7 +2247,11 @@ void DolphinView::applyDynamicView() for (const auto &file : itemList) { ++checkedItems; +#if QT_VERSION >= QT_VERSION_CHECK(6, 8, 0) + const QString type = file.mimetype().slice(0, 5); +#else const QString type = file.mimetype().sliced(0, 5); +#endif if (type == "image" || type == "video") { ++imageAndVideoCount; |
