commit: dbcb9000f3f5121b80ac708093657d1cc4ddc84a
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Tue Apr 7 22:30:22 2020 +0000
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Mon Apr 13 09:00:43 2020 +0000
URL: https://gitweb.gentoo.org/proj/kde.git/commit/?id=dbcb9000
kde-apps/dolphin: Fix crashes with Qt 5.14.2
Package-Manager: Portage-2.3.96, Repoman-2.3.22
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
kde-apps/dolphin/dolphin-20.03.90.ebuild | 2 ++
.../dolphin-19.12.3-fix-crash-w-qt-5.14.2.patch | 22 ++++++++++++++++++++++
2 files changed, 24 insertions(+)
diff --git a/kde-apps/dolphin/dolphin-20.03.90.ebuild
b/kde-apps/dolphin/dolphin-20.03.90.ebuild
index 6fb1850a83..98d4125d54 100644
--- a/kde-apps/dolphin/dolphin-20.03.90.ebuild
+++ b/kde-apps/dolphin/dolphin-20.03.90.ebuild
@@ -64,6 +64,8 @@ RDEPEND="${DEPEND}
RESTRICT+=" test"
+PATCHES=( "${FILESDIR}/${PN}-19.12.3-fix-crash-w-qt-5.14.2.patch" ) # KDE-Bug
419585
+
src_configure() {
local mycmakeargs=(
$(cmake_use_find_package activities KF5Activities)
diff --git a/kde-apps/dolphin/files/dolphin-19.12.3-fix-crash-w-qt-5.14.2.patch
b/kde-apps/dolphin/files/dolphin-19.12.3-fix-crash-w-qt-5.14.2.patch
new file mode 100644
index 0000000000..3e5245001b
--- /dev/null
+++ b/kde-apps/dolphin/files/dolphin-19.12.3-fix-crash-w-qt-5.14.2.patch
@@ -0,0 +1,22 @@
+diff --git a/src/kitemviews/kfileitemmodel.cpp
b/src/kitemviews/kfileitemmodel.cpp
+--- a/src/kitemviews/kfileitemmodel.cpp
++++ b/src/kitemviews/kfileitemmodel.cpp
+@@ -33,6 +33,9 @@
+ #include <QMimeData>
+ #include <QTimer>
+ #include <QWidget>
++#include <QMutex>
++
++Q_GLOBAL_STATIC_WITH_ARGS(QMutex, s_collatorMutex, (QMutex::Recursive))
+
+ // #define KFILEITEMMODEL_DEBUG
+
+@@ -1878,6 +1881,8 @@
+
+ int KFileItemModel::stringCompare(const QString& a, const QString& b, const
QCollator& collator) const
+ {
++ QMutexLocker collatorLock(s_collatorMutex());
++
+ if (m_naturalSorting) {
+ return collator.compare(a, b);
+ }