Skip to content

Commit

Permalink
Take context by copy in lambda
Browse files Browse the repository at this point in the history
  • Loading branch information
elpaso committed Nov 5, 2018
1 parent 661aad7 commit 29cbb23
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/qgsproject.cpp
Expand Up @@ -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 );
Expand Down

0 comments on commit 29cbb23

Please sign in to comment.