Skip to content
Permalink
Browse files

Take context by copy in lambda

  • Loading branch information
elpaso committed Nov 2, 2018
1 parent 661aad7 commit 29cbb23ab3d57fcdaf1a31e2d32c976631d5fd4c
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/core/qgsproject.cpp
@@ -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 );

0 comments on commit 29cbb23

Please sign in to comment.
You can’t perform that action at this time.