Skip to content

Commit 2446dae

Browse files
committed
Some more new style connects
1 parent 265da3f commit 2446dae

27 files changed

+223
-221
lines changed

src/gui/attributetable/qgsattributetablefiltermodel.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -252,8 +252,8 @@ void QgsAttributeTableFilterModel::setSourceModel( QgsAttributeTableModel *sourc
252252
disconnect( sourceModel, SIGNAL( columnsAboutToBeRemoved( QModelIndex, int, int ) ), this, SLOT( _q_sourceColumnsAboutToBeRemoved( QModelIndex, int, int ) ) );
253253
disconnect( sourceModel, SIGNAL( columnsRemoved( QModelIndex, int, int ) ), this, SLOT( _q_sourceColumnsRemoved( QModelIndex, int, int ) ) );
254254

255-
connect( mTableModel, SIGNAL( columnsAboutToBeInserted( QModelIndex, int, int ) ), this, SLOT( onColumnsChanged() ) );
256-
connect( mTableModel, SIGNAL( columnsAboutToBeRemoved( QModelIndex, int, int ) ), this, SLOT( onColumnsChanged() ) );
255+
connect( mTableModel, &QAbstractItemModel::columnsAboutToBeInserted, this, &QgsAttributeTableFilterModel::onColumnsChanged );
256+
connect( mTableModel, &QAbstractItemModel::columnsAboutToBeRemoved, this, &QgsAttributeTableFilterModel::onColumnsChanged );
257257
}
258258

259259
bool QgsAttributeTableFilterModel::selectedOnTop()
@@ -286,12 +286,12 @@ void QgsAttributeTableFilterModel::setFilterMode( FilterMode filterMode )
286286
{
287287
if ( filterMode == ShowVisible )
288288
{
289-
connect( mCanvas, SIGNAL( extentsChanged() ), this, SLOT( extentsChanged() ) );
289+
connect( mCanvas, &QgsMapCanvas::extentsChanged, this, &QgsAttributeTableFilterModel::extentsChanged );
290290
generateListOfVisibleFeatures();
291291
}
292292
else
293293
{
294-
disconnect( mCanvas, SIGNAL( extentsChanged() ), this, SLOT( extentsChanged() ) );
294+
disconnect( mCanvas, &QgsMapCanvas::extentsChanged, this, &QgsAttributeTableFilterModel::extentsChanged );
295295
}
296296

297297
mFilterMode = filterMode;

src/gui/attributetable/qgsattributetableview.cpp

+13-11
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,11 @@ QgsAttributeTableView::QgsAttributeTableView( QWidget *parent )
6363

6464
verticalHeader()->viewport()->installEventFilter( this );
6565

66-
connect( verticalHeader(), SIGNAL( sectionPressed( int ) ), this, SLOT( selectRow( int ) ) );
67-
connect( verticalHeader(), SIGNAL( sectionEntered( int ) ), this, SLOT( _q_selectRow( int ) ) );
68-
connect( horizontalHeader(), SIGNAL( sectionResized( int, int, int ) ), this, SLOT( columnSizeChanged( int, int, int ) ) );
69-
connect( horizontalHeader(), SIGNAL( sortIndicatorChanged( int, Qt::SortOrder ) ), this, SLOT( showHorizontalSortIndicator() ) );
70-
connect( QgsMapLayerActionRegistry::instance(), SIGNAL( changed() ), this, SLOT( recreateActionWidgets() ) );
66+
connect( verticalHeader(), &QHeaderView::sectionPressed, this, [ = ]( int row ) { selectRow( row, false ); } );
67+
connect( verticalHeader(), &QHeaderView::sectionEntered, this, &QgsAttributeTableView::_q_selectRow );
68+
connect( horizontalHeader(), &QHeaderView::sectionResized, this, &QgsAttributeTableView::columnSizeChanged );
69+
connect( horizontalHeader(), &QHeaderView::sortIndicatorChanged, this, &QgsAttributeTableView::showHorizontalSortIndicator );
70+
connect( QgsMapLayerActionRegistry::instance(), &QgsMapLayerActionRegistry::changed, this, &QgsAttributeTableView::recreateActionWidgets );
7171
}
7272

7373
bool QgsAttributeTableView::eventFilter( QObject *object, QEvent *event )
@@ -118,8 +118,8 @@ void QgsAttributeTableView::setModel( QgsAttributeTableFilterModel *filterModel
118118

119119
if ( mFilterModel )
120120
{
121-
connect( mFilterModel, SIGNAL( destroyed() ), this, SLOT( modelDeleted() ) );
122-
connect( mTableDelegate, SIGNAL( actionColumnItemPainted( QModelIndex ) ), this, SLOT( onActionColumnItemPainted( QModelIndex ) ) );
121+
connect( mFilterModel, &QObject::destroyed, this, &QgsAttributeTableView::modelDeleted );
122+
connect( mTableDelegate, &QgsAttributeTableDelegate::actionColumnItemPainted, this, &QgsAttributeTableView::onActionColumnItemPainted );
123123
}
124124

125125
delete mFeatureSelectionModel;
@@ -135,8 +135,10 @@ void QgsAttributeTableView::setModel( QgsAttributeTableFilterModel *filterModel
135135
mFeatureSelectionModel = new QgsFeatureSelectionModel( mFilterModel, mFilterModel, mFeatureSelectionManager, mFilterModel );
136136
setSelectionModel( mFeatureSelectionModel );
137137
mTableDelegate->setFeatureSelectionModel( mFeatureSelectionModel );
138-
connect( mFeatureSelectionModel, SIGNAL( requestRepaint( QModelIndexList ) ), this, SLOT( repaintRequested( QModelIndexList ) ) );
139-
connect( mFeatureSelectionModel, SIGNAL( requestRepaint() ), this, SLOT( repaintRequested() ) );
138+
connect( mFeatureSelectionModel, static_cast<void ( QgsFeatureSelectionModel::* )( const QModelIndexList &indexes )>( &QgsFeatureSelectionModel::requestRepaint ),
139+
this, static_cast<void ( QgsAttributeTableView::* )( const QModelIndexList &indexes )>( &QgsAttributeTableView::repaintRequested ) );
140+
connect( mFeatureSelectionModel, static_cast<void ( QgsFeatureSelectionModel::* )()>( &QgsFeatureSelectionModel::requestRepaint ),
141+
this, static_cast<void ( QgsAttributeTableView::* )()>( &QgsAttributeTableView::repaintRequested ) );
140142
}
141143
}
142144

@@ -185,7 +187,7 @@ QWidget *QgsAttributeTableView::createActionWidget( QgsFeatureId fid )
185187
act->setData( "user_action" );
186188
act->setProperty( "fid", fid );
187189
act->setProperty( "action_id", action.id() );
188-
connect( act, SIGNAL( triggered( bool ) ), this, SLOT( actionTriggered() ) );
190+
connect( act, &QAction::triggered, this, &QgsAttributeTableView::actionTriggered );
189191
actionList << act;
190192

191193
if ( mFilterModel->layer()->actions()->defaultAction( QStringLiteral( "AttributeTableRow" ) ).id() == action.id() )
@@ -202,7 +204,7 @@ QWidget *QgsAttributeTableView::createActionWidget( QgsFeatureId fid )
202204
action->setToolTip( mapLayerAction->text() );
203205
action->setProperty( "fid", fid );
204206
action->setProperty( "action", qVariantFromValue( qobject_cast<QObject *>( mapLayerAction ) ) );
205-
connect( action, SIGNAL( triggered() ), this, SLOT( actionTriggered() ) );
207+
connect( action, &QAction::triggered, this, &QgsAttributeTableView::actionTriggered );
206208
actionList << action;
207209

208210
if ( !defaultAction &&

src/gui/attributetable/qgsfeaturelistmodel.cpp

+6-6
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,13 @@ void QgsFeatureListModel::setSourceModel( QgsAttributeTableFilterModel *sourceMo
4242
if ( mFilterModel )
4343
{
4444
// rewire (filter-)change events in the source model so this proxy reflects the changes
45-
connect( mFilterModel, SIGNAL( rowsAboutToBeRemoved( const QModelIndex &, int, int ) ), SLOT( onBeginRemoveRows( const QModelIndex &, int, int ) ) );
46-
connect( mFilterModel, SIGNAL( rowsRemoved( const QModelIndex &, int, int ) ), SLOT( onEndRemoveRows( const QModelIndex &, int, int ) ) );
47-
connect( mFilterModel, SIGNAL( rowsAboutToBeInserted( const QModelIndex &, int, int ) ), SLOT( onBeginInsertRows( const QModelIndex &, int, int ) ) );
48-
connect( mFilterModel, SIGNAL( rowsInserted( const QModelIndex &, int, int ) ), SLOT( onEndInsertRows( const QModelIndex &, int, int ) ) );
45+
connect( mFilterModel, &QAbstractItemModel::rowsAboutToBeRemoved, this, &QgsFeatureListModel::onBeginRemoveRows );
46+
connect( mFilterModel, &QAbstractItemModel::rowsRemoved, this, &QgsFeatureListModel::onEndRemoveRows );
47+
connect( mFilterModel, &QAbstractItemModel::rowsAboutToBeInserted, this, &QgsFeatureListModel::onBeginInsertRows );
48+
connect( mFilterModel, &QAbstractItemModel::rowsInserted, this, &QgsFeatureListModel::onEndInsertRows );
4949
// propagate sort order changes from source model to views connected to this model
50-
connect( mFilterModel, SIGNAL( layoutAboutToBeChanged() ), this, SIGNAL( layoutAboutToBeChanged() ) );
51-
connect( mFilterModel, SIGNAL( layoutChanged() ), this, SIGNAL( layoutChanged() ) );
50+
connect( mFilterModel, &QAbstractItemModel::layoutAboutToBeChanged, this, &QAbstractItemModel::layoutAboutToBeChanged );
51+
connect( mFilterModel, &QAbstractItemModel::layoutChanged, this, &QAbstractItemModel::layoutChanged );
5252
}
5353
}
5454

src/gui/attributetable/qgsfeaturelistview.cpp

+6-6
Original file line numberDiff line numberDiff line change
@@ -77,12 +77,12 @@ void QgsFeatureListView::setModel( QgsFeatureListModel *featureListModel )
7777
setItemDelegate( mItemDelegate );
7878

7979
mItemDelegate->setFeatureSelectionModel( mFeatureSelectionModel );
80-
connect( mFeatureSelectionModel, SIGNAL( requestRepaint( QModelIndexList ) ), this, SLOT( repaintRequested( QModelIndexList ) ) );
81-
connect( mFeatureSelectionModel, SIGNAL( requestRepaint() ), this, SLOT( repaintRequested() ) );
82-
83-
connect( mCurrentEditSelectionModel, SIGNAL( selectionChanged( QItemSelection, QItemSelection ) ), SLOT( editSelectionChanged( QItemSelection, QItemSelection ) ) );
84-
85-
connect( mModel->layerCache()->layer(), SIGNAL( attributeValueChanged( QgsFeatureId, int, QVariant ) ), this, SLOT( repaintRequested() ) );
80+
connect( mFeatureSelectionModel, static_cast<void ( QgsFeatureSelectionModel::* )( const QModelIndexList &indexes )>( &QgsFeatureSelectionModel::requestRepaint ),
81+
this, static_cast<void ( QgsFeatureListView::* )( const QModelIndexList &indexes )>( &QgsFeatureListView::repaintRequested ) );
82+
connect( mFeatureSelectionModel, static_cast<void ( QgsFeatureSelectionModel::* )()>( &QgsFeatureSelectionModel::requestRepaint ),
83+
this, static_cast<void ( QgsFeatureListView::* )()>( &QgsFeatureListView::repaintRequested ) );
84+
connect( mCurrentEditSelectionModel, &QItemSelectionModel::selectionChanged, this, &QgsFeatureListView::editSelectionChanged );
85+
connect( mModel->layerCache()->layer(), &QgsVectorLayer::attributeValueChanged, this, [ = ] { repaintRequested(); } );
8686
}
8787

8888
bool QgsFeatureListView::setDisplayExpression( const QString &expression )

src/gui/attributetable/qgsfeatureselectionmodel.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ void QgsFeatureSelectionModel::selectFeatures( const QItemSelection &selection,
8282
ids << id;
8383
}
8484

85-
disconnect( mFeatureSelectionManager, SIGNAL( selectionChanged( QgsFeatureIds, QgsFeatureIds, bool ) ), this, SLOT( layerSelectionChanged( QgsFeatureIds, QgsFeatureIds, bool ) ) );
85+
disconnect( mFeatureSelectionManager, &QgsIFeatureSelectionManager::selectionChanged, this, &QgsFeatureSelectionModel::layerSelectionChanged );
8686

8787
if ( command.testFlag( QItemSelectionModel::ClearAndSelect ) )
8888
{
@@ -137,7 +137,7 @@ void QgsFeatureSelectionModel::selectFeatures( const QItemSelection &selection,
137137
}
138138
}
139139

140-
connect( mFeatureSelectionManager, SIGNAL( selectionChanged( QgsFeatureIds, QgsFeatureIds, bool ) ), this, SLOT( layerSelectionChanged( QgsFeatureIds, QgsFeatureIds, bool ) ) );
140+
connect( mFeatureSelectionManager, &QgsIFeatureSelectionManager::selectionChanged, this, &QgsFeatureSelectionModel::layerSelectionChanged );
141141

142142
QModelIndexList updatedIndexes;
143143
Q_FOREACH ( const QModelIndex &idx, selection.indexes() )
@@ -152,7 +152,7 @@ void QgsFeatureSelectionModel::setFeatureSelectionManager( QgsIFeatureSelectionM
152152
{
153153
mFeatureSelectionManager = featureSelectionManager;
154154

155-
connect( mFeatureSelectionManager, SIGNAL( selectionChanged( QgsFeatureIds, QgsFeatureIds, bool ) ), this, SLOT( layerSelectionChanged( QgsFeatureIds, QgsFeatureIds, bool ) ) );
155+
connect( mFeatureSelectionManager, &QgsIFeatureSelectionManager::selectionChanged, this, &QgsFeatureSelectionModel::layerSelectionChanged );
156156
}
157157

158158
void QgsFeatureSelectionModel::layerSelectionChanged( const QgsFeatureIds &selected, const QgsFeatureIds &deselected, bool clearAndSelect )

src/gui/attributetable/qgsfieldconditionalformatwidget.cpp

+11-11
Original file line numberDiff line numberDiff line change
@@ -30,17 +30,17 @@ QgsFieldConditionalFormatWidget::QgsFieldConditionalFormatWidget( QWidget *paren
3030
{
3131
setupUi( this );
3232
mDeleteButton->hide();
33-
connect( mFieldCombo, SIGNAL( fieldChanged( QString ) ), SLOT( fieldChanged( QString ) ) );
34-
connect( fieldRadio, SIGNAL( clicked() ), SLOT( reloadStyles() ) );
35-
connect( rowRadio, SIGNAL( clicked() ), SLOT( reloadStyles() ) );
36-
connect( mNewButton, SIGNAL( clicked() ), SLOT( addNewRule() ) );
37-
connect( mSaveRule, SIGNAL( clicked() ), SLOT( saveRule() ) );
38-
connect( mCancelButton, SIGNAL( clicked() ), SLOT( cancelRule() ) );
39-
connect( mDeleteButton, SIGNAL( clicked() ), SLOT( deleteRule() ) );
40-
connect( listView, SIGNAL( clicked( QModelIndex ) ), SLOT( ruleClicked( QModelIndex ) ) );
41-
connect( btnChangeIcon, SIGNAL( clicked() ), SLOT( updateIcon() ) );
42-
connect( btnBuildExpression, SIGNAL( clicked() ), SLOT( setExpression() ) );
43-
connect( mPresetsList, SIGNAL( currentIndexChanged( int ) ), SLOT( presetSet( int ) ) );
33+
connect( mFieldCombo, &QgsFieldComboBox::fieldChanged, this, &QgsFieldConditionalFormatWidget::fieldChanged );
34+
connect( fieldRadio, &QAbstractButton::clicked, this, &QgsFieldConditionalFormatWidget::reloadStyles );
35+
connect( rowRadio, &QAbstractButton::clicked, this, &QgsFieldConditionalFormatWidget::reloadStyles );
36+
connect( mNewButton, &QAbstractButton::clicked, this, &QgsFieldConditionalFormatWidget::addNewRule );
37+
connect( mSaveRule, &QAbstractButton::clicked, this, &QgsFieldConditionalFormatWidget::saveRule );
38+
connect( mCancelButton, &QAbstractButton::clicked, this, &QgsFieldConditionalFormatWidget::cancelRule );
39+
connect( mDeleteButton, &QAbstractButton::clicked, this, &QgsFieldConditionalFormatWidget::deleteRule );
40+
connect( listView, &QAbstractItemView::clicked, this, &QgsFieldConditionalFormatWidget::ruleClicked );
41+
connect( btnChangeIcon, &QAbstractButton::clicked, this, &QgsFieldConditionalFormatWidget::updateIcon );
42+
connect( btnBuildExpression, &QAbstractButton::clicked, this, &QgsFieldConditionalFormatWidget::setExpression );
43+
connect( mPresetsList, static_cast<void ( QComboBox::* )( int )>( &QComboBox::currentIndexChanged ), this, &QgsFieldConditionalFormatWidget::presetSet );
4444
btnBackgroundColor->setAllowAlpha( true );
4545
btnBackgroundColor->setShowNoColor( true );
4646
btnTextColor->setAllowAlpha( true );

src/gui/attributetable/qgsorganizetablecolumnsdialog.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ QgsOrganizeTableColumnsDialog::QgsOrganizeTableColumnsDialog( const QgsVectorLay
4545
{
4646
setupUi( this );
4747

48-
connect( mShowAllButton, SIGNAL( clicked( bool ) ), this, SLOT( showAll() ) );
49-
connect( mHideAllButton, SIGNAL( clicked( bool ) ), this, SLOT( hideAll() ) );
48+
connect( mShowAllButton, &QAbstractButton::clicked, this, &QgsOrganizeTableColumnsDialog::showAll );
49+
connect( mHideAllButton, &QAbstractButton::clicked, this, &QgsOrganizeTableColumnsDialog::hideAll );
5050

5151
if ( vl )
5252
{

src/gui/auth/qgsauthauthoritieseditor.cpp

+13-13
Original file line numberDiff line numberDiff line change
@@ -64,21 +64,21 @@ QgsAuthAuthoritiesEditor::QgsAuthAuthoritiesEditor( QWidget *parent )
6464
{
6565
setupUi( this );
6666

67-
connect( QgsAuthManager::instance(), SIGNAL( messageOut( const QString &, const QString &, QgsAuthManager::MessageLevel ) ),
68-
this, SLOT( authMessageOut( const QString &, const QString &, QgsAuthManager::MessageLevel ) ) );
67+
connect( QgsAuthManager::instance(), &QgsAuthManager::messageOut,
68+
this, &QgsAuthAuthoritiesEditor::authMessageOut );
6969

70-
connect( QgsAuthManager::instance(), SIGNAL( authDatabaseChanged() ),
71-
this, SLOT( refreshCaCertsView() ) );
70+
connect( QgsAuthManager::instance(), &QgsAuthManager::authDatabaseChanged,
71+
this, &QgsAuthAuthoritiesEditor::refreshCaCertsView );
7272

7373
setupCaCertsTree();
7474

75-
connect( treeWidgetCAs->selectionModel(), SIGNAL( selectionChanged( const QItemSelection &, const QItemSelection & ) ),
76-
this, SLOT( selectionChanged( const QItemSelection &, const QItemSelection & ) ) );
75+
connect( treeWidgetCAs->selectionModel(), &QItemSelectionModel::selectionChanged,
76+
this, &QgsAuthAuthoritiesEditor::selectionChanged );
7777

78-
connect( treeWidgetCAs, SIGNAL( itemDoubleClicked( QTreeWidgetItem *, int ) ),
79-
this, SLOT( handleDoubleClick( QTreeWidgetItem *, int ) ) );
78+
connect( treeWidgetCAs, &QTreeWidget::itemDoubleClicked,
79+
this, &QgsAuthAuthoritiesEditor::handleDoubleClick );
8080

81-
connect( btnViewRefresh, SIGNAL( clicked() ), this, SLOT( refreshCaCertsView() ) );
81+
connect( btnViewRefresh, &QAbstractButton::clicked, this, &QgsAuthAuthoritiesEditor::refreshCaCertsView );
8282

8383
QVariant cafileval = QgsAuthManager::instance()->getAuthSetting( QStringLiteral( "cafile" ) );
8484
if ( !cafileval.isNull() )
@@ -336,10 +336,10 @@ void QgsAuthAuthoritiesEditor::updateCertTrustPolicyCache()
336336
void QgsAuthAuthoritiesEditor::populateUtilitiesMenu()
337337
{
338338
mActionDefaultTrustPolicy = new QAction( QStringLiteral( "Change default trust policy" ), this );
339-
connect( mActionDefaultTrustPolicy, SIGNAL( triggered() ), this, SLOT( editDefaultTrustPolicy() ) );
339+
connect( mActionDefaultTrustPolicy, &QAction::triggered, this, &QgsAuthAuthoritiesEditor::editDefaultTrustPolicy );
340340

341341
mActionShowTrustedCAs = new QAction( QStringLiteral( "Show trusted authorities/issuers" ), this );
342-
connect( mActionShowTrustedCAs, SIGNAL( triggered() ), this, SLOT( showTrustedCertificateAuthorities() ) );
342+
connect( mActionShowTrustedCAs, &QAction::triggered, this, &QgsAuthAuthoritiesEditor::showTrustedCertificateAuthorities );
343343

344344
mUtilitiesMenu = new QMenu( this );
345345
mUtilitiesMenu->addAction( mActionDefaultTrustPolicy );
@@ -621,8 +621,8 @@ void QgsAuthAuthoritiesEditor::editDefaultTrustPolicy()
621621

622622
layout->addWidget( buttonBox );
623623

624-
connect( buttonBox, SIGNAL( accepted() ), dlg, SLOT( accept() ) );
625-
connect( buttonBox, SIGNAL( rejected() ), dlg, SLOT( close() ) );
624+
connect( buttonBox, &QDialogButtonBox::accepted, dlg, &QDialog::accept );
625+
connect( buttonBox, &QDialogButtonBox::rejected, dlg, &QWidget::close );
626626

627627
dlg->setLayout( layout );
628628
dlg->setWindowModality( Qt::WindowModal );

src/gui/auth/qgsauthcertificateinfo.cpp

+5-5
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,8 @@ QgsAuthCertInfo::QgsAuthCertInfo( const QSslCertificate &cert,
8585

8686
treeHierarchy->setRootIsDecorated( false );
8787

88-
connect( treeHierarchy, SIGNAL( currentItemChanged( QTreeWidgetItem *, QTreeWidgetItem * ) ),
89-
this, SLOT( currentCertItemChanged( QTreeWidgetItem *, QTreeWidgetItem * ) ) );
88+
connect( treeHierarchy, &QTreeWidget::currentItemChanged,
89+
this, &QgsAuthCertInfo::currentCertItemChanged );
9090

9191
mCaCertsCache = QgsAuthManager::instance()->getCaCertsCache();
9292

@@ -107,8 +107,8 @@ QgsAuthCertInfo::QgsAuthCertInfo( const QSslCertificate &cert,
107107
if ( res )
108108
setCertHierarchy();
109109

110-
connect( cmbbxTrust, SIGNAL( currentIndexChanged( int ) ),
111-
this, SLOT( currentPolicyIndexChanged( int ) ) );
110+
connect( cmbbxTrust, static_cast<void ( QComboBox::* )( int )>( &QComboBox::currentIndexChanged ),
111+
this, &QgsAuthCertInfo::currentPolicyIndexChanged );
112112
}
113113
}
114114

@@ -929,7 +929,7 @@ QgsAuthCertInfoDialog::QgsAuthCertInfoDialog( const QSslCertificate &cert,
929929
QDialogButtonBox *buttonBox = new QDialogButtonBox( QDialogButtonBox::Close,
930930
Qt::Horizontal, this );
931931
buttonBox->button( QDialogButtonBox::Close )->setDefault( true );
932-
connect( buttonBox, SIGNAL( rejected() ), this, SLOT( close() ) );
932+
connect( buttonBox, &QDialogButtonBox::rejected, this, &QWidget::close );
933933
layout->addWidget( buttonBox );
934934

935935
setLayout( layout );

src/gui/auth/qgsauthcertificatemanager.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ QgsAuthCertManager::QgsAuthCertManager( QWidget *parent )
4040
QDialogButtonBox *buttonBox = new QDialogButtonBox( QDialogButtonBox::Close,
4141
Qt::Horizontal, this );
4242
buttonBox->button( QDialogButtonBox::Close )->setDefault( true );
43-
connect( buttonBox, SIGNAL( rejected() ), this, SLOT( close() ) );
43+
connect( buttonBox, &QDialogButtonBox::rejected, this, &QWidget::close );
4444
layout->addWidget( buttonBox );
4545

4646
setLayout( layout );

src/gui/auth/qgsauthcerttrustpolicycombobox.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ QgsAuthCertTrustPolicyComboBox::QgsAuthCertTrustPolicyComboBox( QWidget *parent,
5151
// setEditable( true );
5252
// lineEdit()->setReadOnly( true );
5353

54-
connect( this, SIGNAL( currentIndexChanged( int ) ),
55-
this, SLOT( highlightCurrentIndex( int ) ) );
54+
connect( this, static_cast<void ( QComboBox::* )( int )>( &QComboBox::currentIndexChanged ),
55+
this, &QgsAuthCertTrustPolicyComboBox::highlightCurrentIndex );
5656

5757
setTrustPolicy( policy );
5858
setDefaultTrustPolicy( defaultpolicy );

0 commit comments

Comments
 (0)