mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
Take context by copy in lambda
This commit is contained in:
parent
661aad7ef9
commit
29cbb23ab3
@ -369,14 +369,14 @@ QgsProject::QgsProject( QObject *parent )
|
||||
if ( QgsApplication::instance() )
|
||||
connect( QgsApplication::instance(), &QgsApplication::requestForTranslatableObjects, this, &QgsProject::registerTranslatableObjects );
|
||||
connect( mLayerStore.get(), static_cast<void ( QgsMapLayerStore::* )( const QList<QgsMapLayer *> & )>( &QgsMapLayerStore::layersWillBeRemoved ),
|
||||
[ & ]( const QList<QgsMapLayer *> &layers )
|
||||
[ = ]( const QList<QgsMapLayer *> &layers )
|
||||
{
|
||||
for ( const auto &layer : layers )
|
||||
disconnect( layer, &QgsMapLayer::dataSourceChanged, mRelationManager, &QgsRelationManager::updateRelationsStatus );
|
||||
}
|
||||
);
|
||||
connect( mLayerStore.get(), static_cast<void ( QgsMapLayerStore::* )( const QList<QgsMapLayer *> & )>( &QgsMapLayerStore::layersAdded ),
|
||||
[ & ]( const QList<QgsMapLayer *> &layers )
|
||||
[ = ]( const QList<QgsMapLayer *> &layers )
|
||||
{
|
||||
for ( const auto &layer : layers )
|
||||
connect( layer, &QgsMapLayer::dataSourceChanged, mRelationManager, &QgsRelationManager::updateRelationsStatus );
|
||||
|
Loading…
x
Reference in New Issue
Block a user