Skip to content

Commit 85aaf7e

Browse files
committedNov 6, 2018
Fix some missing context arguments in connects with lambda
These cause infinite lifetime connections which result in crashes (cherry picked from commit 3d5badf)
1 parent 647de81 commit 85aaf7e

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed
 

‎src/app/decorations/qgsdecorationnortharrowdialog.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ QgsDecorationNorthArrowDialog::QgsDecorationNorthArrowDialog( QgsDecorationNorth
5252
spinAngle->setEnabled( !mDeco.mAutomatic );
5353
sliderRotation->setEnabled( !mDeco.mAutomatic );
5454

55-
connect( cboxAutomatic, &QAbstractButton::toggled, [ = ]( bool checked )
55+
connect( cboxAutomatic, &QAbstractButton::toggled, this, [ = ]( bool checked )
5656
{
5757
spinAngle->setEnabled( !checked );
5858
sliderRotation->setEnabled( !checked );

‎src/app/qgsoptions.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ QgsOptions::QgsOptions( QWidget *parent, Qt::WindowFlags fl, const QList<QgsOpti
101101
connect( mCustomVariablesChkBx, &QCheckBox::toggled, this, &QgsOptions::mCustomVariablesChkBx_toggled );
102102
connect( mCurrentVariablesQGISChxBx, &QCheckBox::toggled, this, &QgsOptions::mCurrentVariablesQGISChxBx_toggled );
103103
connect( buttonBox, &QDialogButtonBox::helpRequested, this, &QgsOptions::showHelp );
104-
connect( cboGlobalLocale, qgis::overload< int >::of( &QComboBox::currentIndexChanged ), [ = ]( int ) { updateSampleLocaleText( ); } );
104+
connect( cboGlobalLocale, qgis::overload< int >::of( &QComboBox::currentIndexChanged ), this, [ = ]( int ) { updateSampleLocaleText( ); } );
105105
connect( cbShowGroupSeparator, &QCheckBox::toggled, this, [ = ]( bool ) { updateSampleLocaleText(); } );
106106

107107
// QgsOptionsDialogBase handles saving/restoring of geometry, splitter and current tab states,

‎src/gui/processing/qgsprocessingconfigurationwidgets.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ QgsFilterAlgorithmConfigurationWidget::QgsFilterAlgorithmConfigurationWidget( QW
6262
connect( addOutputButton, &QToolButton::clicked, this, &QgsFilterAlgorithmConfigurationWidget::addOutput );
6363
connect( removeOutputButton, &QToolButton::clicked, this, &QgsFilterAlgorithmConfigurationWidget::removeSelectedOutputs );
6464

65-
connect( mOutputExpressionWidget->selectionModel(), &QItemSelectionModel::selectionChanged, [removeOutputButton, this]
65+
connect( mOutputExpressionWidget->selectionModel(), &QItemSelectionModel::selectionChanged, this, [removeOutputButton, this]
6666
{
6767
removeOutputButton->setEnabled( !mOutputExpressionWidget->selectionModel()->selectedIndexes().isEmpty() );
6868
} );

‎src/plugins/georeferencer/qgsgeorefplugingui.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -584,7 +584,7 @@ void QgsGeorefPluginGui::showCoordDialog( const QgsPointXY &pixelCoords )
584584
if ( mLayer && !mMapCoordsDialog )
585585
{
586586
mMapCoordsDialog = new QgsMapCoordsDialog( mIface->mapCanvas(), pixelCoords, this );
587-
connect( mMapCoordsDialog, &QgsMapCoordsDialog::pointAdded,
587+
connect( mMapCoordsDialog, &QgsMapCoordsDialog::pointAdded, this,
588588
[this]( const QgsPointXY & a, const QgsPointXY & b ) { this->addPoint( a, b ); }
589589
);
590590
mMapCoordsDialog->show();

0 commit comments

Comments
 (0)
Please sign in to comment.