┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/kitemviews
diff options
context:
space:
mode:
authorAlexander Lohnau <[email protected]>2020-04-13 21:25:52 +0200
committerAlexander Lohnau <[email protected]>2020-04-13 21:25:52 +0200
commitfa3f3a475dd5e522acd40b7a31ec3aeb87400c69 (patch)
tree3c798474252b381a9d114655ebfd0c3ed0eb9d3b /src/kitemviews
parent5351db95c6460b568052f23399e0ea9b4a02d9b4 (diff)
parent514d9c8fc9705f76fda8f22c70730fb9c383c95a (diff)
Merge branch 'release/20.04'
Diffstat (limited to 'src/kitemviews')
-rw-r--r--src/kitemviews/kfileitemmodel.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/kitemviews/kfileitemmodel.cpp b/src/kitemviews/kfileitemmodel.cpp
index 4b35a0248..e4dca2734 100644
--- 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::sortRoleCompare(const ItemData* a, const ItemData* b, const
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);
}