From a88002933a230c9af1f282e75222733b3130a4a5 Mon Sep 17 00:00:00 2001 From: YiFang Xiao Date: Fri, 27 Dec 2024 11:27:44 +0800 Subject: [PATCH] 1 --- src/dict/dsl.cc | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/dict/dsl.cc b/src/dict/dsl.cc index 31beddd3c..ae6117171 100644 --- a/src/dict/dsl.cc +++ b/src/dict/dsl.cc @@ -1608,14 +1608,12 @@ void DslResourceRequest::run() { n, dict.getResourceDir1() + resourceName, dict.getResourceDir2() + resourceName } ); qDebug( "found dsl resource name is %s", fp.c_str() ); try { + QMutexLocker _( &dataMutex ); if ( !fp.empty() ) { - QMutexLocker _( &dataMutex ); File::loadFromFile( fp, data ); } else if ( dict.resourceZip.isOpen() ) { - QMutexLocker _( &dataMutex ); - if ( !dict.resourceZip.loadFile( Text::toUtf32( resourceName ), data ) ) { throw std::runtime_error( "Failed to load file from resource zip" ); } @@ -1626,13 +1624,9 @@ void DslResourceRequest::run() if ( Filetype::isNameOfTiff( resourceName ) ) { // Convert it - - QMutexLocker _( &dataMutex ); GdTiff::tiff2img( data ); } - QMutexLocker _( &dataMutex ); - hasAnyData = true; } catch ( std::exception & ex ) {