Skip to content
Permalink
Browse files

Fix some missing context arguments in connects with lambda

These cause infinite lifetime connections which result in crashes
  • Loading branch information
nyalldawson committed Nov 4, 2018
1 parent dc72f06 commit 3d5badf395392dab3450a9585cb10d74d567f817
@@ -52,7 +52,7 @@ QgsDecorationNorthArrowDialog::QgsDecorationNorthArrowDialog( QgsDecorationNorth
spinAngle->setEnabled( !mDeco.mAutomatic );
sliderRotation->setEnabled( !mDeco.mAutomatic );

connect( cboxAutomatic, &QAbstractButton::toggled, [ = ]( bool checked )
connect( cboxAutomatic, &QAbstractButton::toggled, this, [ = ]( bool checked )
{
spinAngle->setEnabled( !checked );
sliderRotation->setEnabled( !checked );
@@ -101,7 +101,7 @@ QgsOptions::QgsOptions( QWidget *parent, Qt::WindowFlags fl, const QList<QgsOpti
connect( mCustomVariablesChkBx, &QCheckBox::toggled, this, &QgsOptions::mCustomVariablesChkBx_toggled );
connect( mCurrentVariablesQGISChxBx, &QCheckBox::toggled, this, &QgsOptions::mCurrentVariablesQGISChxBx_toggled );
connect( buttonBox, &QDialogButtonBox::helpRequested, this, &QgsOptions::showHelp );
connect( cboGlobalLocale, qgis::overload< int >::of( &QComboBox::currentIndexChanged ), [ = ]( int ) { updateSampleLocaleText( ); } );
connect( cboGlobalLocale, qgis::overload< int >::of( &QComboBox::currentIndexChanged ), this, [ = ]( int ) { updateSampleLocaleText( ); } );
connect( cbShowGroupSeparator, &QCheckBox::toggled, this, [ = ]( bool ) { updateSampleLocaleText(); } );

// QgsOptionsDialogBase handles saving/restoring of geometry, splitter and current tab states,
@@ -62,7 +62,7 @@ QgsFilterAlgorithmConfigurationWidget::QgsFilterAlgorithmConfigurationWidget( QW
connect( addOutputButton, &QToolButton::clicked, this, &QgsFilterAlgorithmConfigurationWidget::addOutput );
connect( removeOutputButton, &QToolButton::clicked, this, &QgsFilterAlgorithmConfigurationWidget::removeSelectedOutputs );

connect( mOutputExpressionWidget->selectionModel(), &QItemSelectionModel::selectionChanged, [removeOutputButton, this]
connect( mOutputExpressionWidget->selectionModel(), &QItemSelectionModel::selectionChanged, this, [removeOutputButton, this]
{
removeOutputButton->setEnabled( !mOutputExpressionWidget->selectionModel()->selectedIndexes().isEmpty() );
} );
@@ -584,7 +584,7 @@ void QgsGeorefPluginGui::showCoordDialog( const QgsPointXY &pixelCoords )
if ( mLayer && !mMapCoordsDialog )
{
mMapCoordsDialog = new QgsMapCoordsDialog( mIface->mapCanvas(), pixelCoords, this );
connect( mMapCoordsDialog, &QgsMapCoordsDialog::pointAdded,
connect( mMapCoordsDialog, &QgsMapCoordsDialog::pointAdded, this,
[this]( const QgsPointXY & a, const QgsPointXY & b ) { this->addPoint( a, b ); }
);
mMapCoordsDialog->show();

0 comments on commit 3d5badf

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