From 318e186215c1b04a471fb5da8d056460844ee1b4 Mon Sep 17 00:00:00 2001 From: YiFang Xiao Date: Sun, 11 Jun 2023 21:33:25 +0800 Subject: [PATCH] fix: slob fullindex will freeze the preference dialog --- src/dict/slob.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/dict/slob.cc b/src/dict/slob.cc index c12db4f9..52ac1297 100644 --- a/src/dict/slob.cc +++ b/src/dict/slob.cc @@ -1098,6 +1098,8 @@ void SlobDictionary::sortArticlesOffsetsForFTS( QVector< uint32_t > & offsets, Q qint32 entries = sf.getRefsCount(); for ( qint32 i = 0; i < entries; i++ ) { + if ( Utils::AtomicInt::loadAcquire( isCancelled ) ) + throw exUserAbort(); if ( offsets.contains( sortedOffsets[ i ].second ) ) newOffsets.append( sortedOffsets[ i ].second ); }