From 4b7db871aa2fb35ee06a557552c7053b291eaaeb Mon Sep 17 00:00:00 2001 From: Martin Dobias Date: Mon, 21 Oct 2024 22:33:59 +0200 Subject: [PATCH] Do not preload providers when DontResolveLayers flag is used By a mistake, even when DontResolveLayers flag was used when reading a project file, providers that support parallel loading would still get created. This commit fixes that - they will not get created anymore. --- src/core/project/qgsproject.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/core/project/qgsproject.cpp b/src/core/project/qgsproject.cpp index f36c5465d4eb..11ad59fb906e 100644 --- a/src/core/project/qgsproject.cpp +++ b/src/core/project/qgsproject.cpp @@ -1509,7 +1509,8 @@ bool QgsProject::_getMapLayers( const QDomDocument &doc, QList &broken QVector parallelLoading; QMap loadedProviders; - if ( QgsSettingsRegistryCore::settingsLayerParallelLoading->value() ) + if ( !( flags & Qgis::ProjectReadFlag::DontResolveLayers ) && + QgsSettingsRegistryCore::settingsLayerParallelLoading->value() ) { profile.switchTask( tr( "Load providers in parallel" ) ); for ( const QDomNode &node : sortedLayerNodes )