mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-03 07:35:48 +08:00
Ref T579 Work around proximate cause of data race in CListModelBase.
This is still not thread-safe but at least it is less likely to crash. A more robust fix will be attempted later.
This commit is contained in:
@@ -545,10 +545,11 @@ namespace BlackGui
|
||||
}
|
||||
|
||||
// sort the values
|
||||
const auto tieBreakersCopy = m_sortTieBreakers; //! \todo workaround T579 still not thread-safe, but less likely to crash
|
||||
const std::integral_constant<bool, UseCompare> marker {};
|
||||
const auto p = [ = ](const ObjectType & a, const ObjectType & b) -> bool
|
||||
{
|
||||
return Private::compareForModelSort<ObjectType>(a, b, order, propertyIndex, m_sortTieBreakers, marker);
|
||||
return Private::compareForModelSort<ObjectType>(a, b, order, propertyIndex, tieBreakersCopy, marker);
|
||||
};
|
||||
|
||||
return container.sorted(p);
|
||||
|
||||
Reference in New Issue
Block a user