dolphin_kf6, check Qt version for slice/sliced (#12789)

This commit is contained in:
Schrijvers Luc
2025-08-20 07:46:53 +02:00
committed by GitHub
parent 6eef7925a7
commit 1409535dbc
2 changed files with 8 additions and 5 deletions

View File

@@ -25,7 +25,7 @@ At first look, this is a simple file manager, but it has many talents. Some feat
HOMEPAGE="https://userbase.kde.org/Dolphin"
COPYRIGHT="2000-2025 KDE Organisation"
LICENSE="GNU GPL v2"
REVISION="1"
REVISION="2"
SOURCE_URI="https://download.kde.org/stable/release-service/$portVersion/src/dolphin-$portVersion.tar.xz"
CHECKSUM_SHA256="ddd5e5622594792490695999188c6215c3a0821787c71dfb57dbfdd08e1ce935"
SOURCE_DIR="dolphin-$portVersion"

View File

@@ -1,19 +1,22 @@
From e0a33f4f7b5089fb82eeca1cc2f4262cdef42dc8 Mon Sep 17 00:00:00 2001
From f91b67cd7b0e9ec3e52e4076bb1977e2bde17943 Mon Sep 17 00:00:00 2001
From: Luc Schrijvers <begasus@gmail.com>
Date: Sun, 17 Aug 2025 16:54:30 +0200
Subject: Fix Qt >= 6.8 error
diff --git a/src/views/dolphinview.cpp b/src/views/dolphinview.cpp
index b702f5b..e81b3b1 100644
index b702f5b..1ed8578 100644
--- a/src/views/dolphinview.cpp
+++ b/src/views/dolphinview.cpp
@@ -2247,7 +2247,7 @@ void DolphinView::applyDynamicView()
@@ -2247,7 +2247,11 @@ void DolphinView::applyDynamicView()
for (const auto &file : itemList) {
++checkedItems;
- const QString type = file.mimetype().slice(0, 5);
+#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;