diff --git a/src/core/qgsproject.cpp b/src/core/qgsproject.cpp index 9fa2de6bdf5..f4e8477ba53 100644 --- a/src/core/qgsproject.cpp +++ b/src/core/qgsproject.cpp @@ -387,14 +387,14 @@ QgsProject::QgsProject( QObject *parent ) connect( mLayerStore.get(), &QgsMapLayerStore::layerWasAdded, this, &QgsProject::layerWasAdded ); if ( QgsApplication::instance() ) connect( QgsApplication::instance(), &QgsApplication::requestForTranslatableObjects, this, &QgsProject::registerTranslatableObjects ); - connect( mLayerStore.get(), static_cast & )>( &QgsMapLayerStore::layersWillBeRemoved ), + connect( mLayerStore.get(), static_cast & )>( &QgsMapLayerStore::layersWillBeRemoved ), this, [ = ]( const QList &layers ) { for ( const auto &layer : layers ) disconnect( layer, &QgsMapLayer::dataSourceChanged, mRelationManager, &QgsRelationManager::updateRelationsStatus ); } ); - connect( mLayerStore.get(), static_cast & )>( &QgsMapLayerStore::layersAdded ), + connect( mLayerStore.get(), static_cast & )>( &QgsMapLayerStore::layersAdded ), this, [ = ]( const QList &layers ) { for ( const auto &layer : layers )