Skip to content

Commit 943d1a2

Browse files
committedMar 27, 2017
More Qt5 style connect conversions
1 parent 4d8df75 commit 943d1a2

34 files changed

+189
-183
lines changed
 

‎src/app/qgisapp.h

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -798,6 +798,12 @@ class APP_EXPORT QgisApp : public QMainWindow, private Ui::MainWindow
798798

799799
void renameView();
800800

801+
void showProgress( int progress, int totalSteps );
802+
void showStatusMessage( const QString &message );
803+
804+
//! set the active layer
805+
bool setActiveLayer( QgsMapLayer * );
806+
801807
protected:
802808

803809
//! Handle state changes (WindowTitleChange)
@@ -1118,8 +1124,6 @@ class APP_EXPORT QgisApp : public QMainWindow, private Ui::MainWindow
11181124
void showSelectedLayers();
11191125
//! Return pointer to the active layer
11201126
QgsMapLayer *activeLayer();
1121-
//! set the active layer
1122-
bool setActiveLayer( QgsMapLayer * );
11231127
//! Open the help contents in a browser
11241128
void helpContents();
11251129
//! Open the API documentation in a browser
@@ -1263,10 +1267,9 @@ class APP_EXPORT QgisApp : public QMainWindow, private Ui::MainWindow
12631267

12641268
void selectionChanged( QgsMapLayer *layer );
12651269

1266-
void showProgress( int progress, int totalSteps );
12671270
void extentChanged();
12681271
void showRotation();
1269-
void showStatusMessage( const QString &message );
1272+
12701273
void displayMapToolMessage( const QString &message, QgsMessageBar::MessageLevel level = QgsMessageBar::INFO );
12711274
void displayMessage( const QString &title, const QString &message, QgsMessageBar::MessageLevel level );
12721275
void removeMapToolMessage();

‎src/app/qgsbookmarks.cpp

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,13 @@ QgsBookmarks::QgsBookmarks( QWidget *parent )
5656
QAction *btnImport = share->addAction( tr( "&Import" ) );
5757
btnExport->setIcon( QgsApplication::getThemeIcon( QStringLiteral( "/mActionSharingExport.svg" ) ) );
5858
btnImport->setIcon( QgsApplication::getThemeIcon( QStringLiteral( "/mActionSharingImport.svg" ) ) );
59-
connect( btnExport, SIGNAL( triggered() ), this, SLOT( exportToXml() ) );
60-
connect( btnImport, SIGNAL( triggered() ), this, SLOT( importFromXml() ) );
59+
connect( btnExport, &QAction::triggered, this, &QgsBookmarks::exportToXml );
60+
connect( btnImport, &QAction::triggered, this, &QgsBookmarks::importFromXml );
6161
btnImpExp->setMenu( share );
6262

63-
connect( actionAdd, SIGNAL( triggered() ), this, SLOT( addClicked() ) );
64-
connect( actionDelete, SIGNAL( triggered() ), this, SLOT( deleteClicked() ) );
65-
connect( actionZoomTo, SIGNAL( triggered() ), this, SLOT( zoomToBookmark() ) );
63+
connect( actionAdd, &QAction::triggered, this, &QgsBookmarks::addClicked );
64+
connect( actionDelete, &QAction::triggered, this, &QgsBookmarks::deleteClicked );
65+
connect( actionZoomTo, &QAction::triggered, this, &QgsBookmarks::zoomToBookmark );
6666

6767
mBookmarkToolbar->addWidget( btnImpExp );
6868

@@ -394,9 +394,9 @@ void QgsBookmarks::exportToXml()
394394

395395
QgsProjectBookmarksTableModel::QgsProjectBookmarksTableModel()
396396
{
397-
QObject::connect(
398-
QgisApp::instance(), SIGNAL( projectRead() ),
399-
this, SLOT( projectRead() ) );
397+
connect(
398+
QgisApp::instance(), &QgisApp::projectRead,
399+
this, &QgsProjectBookmarksTableModel::projectRead );
400400
}
401401

402402
int QgsProjectBookmarksTableModel::rowCount( const QModelIndex &parent ) const
@@ -507,25 +507,25 @@ QgsMergedBookmarksTableModel::QgsMergedBookmarksTableModel( QAbstractTableModel
507507
, mProjectOpen( false )
508508
{
509509
connect(
510-
QgisApp::instance(), SIGNAL( projectRead() ),
511-
this, SLOT( projectRead() ) );
510+
QgisApp::instance(), &QgisApp::projectRead,
511+
this, &QgsMergedBookmarksTableModel::projectRead );
512512

513513
connect(
514-
&mQgisTableModel, SIGNAL( layoutChanged() ),
515-
this, SLOT( allLayoutChanged() ) );
514+
&mQgisTableModel, &QAbstractTableModel::layoutChanged,
515+
this, &QgsMergedBookmarksTableModel::allLayoutChanged );
516516
connect(
517-
&mQgisTableModel, SIGNAL( dataChanged( const QModelIndex &, const QModelIndex & ) ),
518-
this, SLOT( qgisDataChanged( const QModelIndex &, const QModelIndex & ) ) );
517+
&mQgisTableModel, &QAbstractTableModel::dataChanged,
518+
this, &QgsMergedBookmarksTableModel::qgisDataChanged );
519519
connect(
520-
&mQgisTableModel, SIGNAL( rowsInserted( const QModelIndex &, int, int ) ),
521-
this, SLOT( allLayoutChanged() ) );
520+
&mQgisTableModel, &QAbstractTableModel::rowsInserted,
521+
this, &QgsMergedBookmarksTableModel::allLayoutChanged );
522522
connect(
523-
&mQgisTableModel, SIGNAL( rowsRemoved( const QModelIndex &, int, int ) ),
524-
this, SLOT( allLayoutChanged() ) );
523+
&mQgisTableModel, &QAbstractTableModel::rowsRemoved,
524+
this, &QgsMergedBookmarksTableModel::allLayoutChanged );
525525

526526
connect(
527-
&projectTableModel, SIGNAL( layoutChanged() ),
528-
this, SLOT( allLayoutChanged() ) );
527+
&projectTableModel, &QAbstractTableModel::layoutChanged,
528+
this, &QgsMergedBookmarksTableModel::allLayoutChanged );
529529
}
530530

531531
int QgsMergedBookmarksTableModel::rowCount( const QModelIndex &parent ) const

‎src/app/qgsbookmarks.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,8 @@ class QgsMergedBookmarksTableModel: public QAbstractTableModel
8484
void moveBookmark( QAbstractTableModel &modelFrom, QAbstractTableModel &modelTo, int row );
8585

8686
private slots:
87-
void projectRead() { mProjectOpen = true; };
88-
void allLayoutChanged() { emit layoutChanged(); };
87+
void projectRead() { mProjectOpen = true; }
88+
void allLayoutChanged() { emit layoutChanged(); }
8989
void qgisDataChanged( const QModelIndex &topLeft, const QModelIndex &bottomRight )
9090
{
9191
emit dataChanged( topLeft, bottomRight );

‎src/app/qgsclipboard.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ QgsClipboard::QgsClipboard()
4343
, mFeatureFields()
4444
, mUseSystemClipboard( false )
4545
{
46-
connect( QApplication::clipboard(), SIGNAL( dataChanged() ), this, SLOT( systemClipboardChanged() ) );
46+
connect( QApplication::clipboard(), &QClipboard::dataChanged, this, &QgsClipboard::systemClipboardChanged );
4747
}
4848

4949
QgsClipboard::~QgsClipboard()

‎src/app/qgscustomization.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,10 @@ QgsCustomizationDialog::QgsCustomizationDialog( QWidget * parent, QSettings * se
5757

5858
mLastDirSettingsName = QStringLiteral( "/UI/lastCustomizationDir" );
5959
//treeWidget->hideColumn(0)
60-
connect( buttonBox->button( QDialogButtonBox::Ok ), SIGNAL( clicked() ), this, SLOT( ok() ) );
61-
connect( buttonBox->button( QDialogButtonBox::Apply ), SIGNAL( clicked() ), this, SLOT( apply() ) );
62-
connect( buttonBox->button( QDialogButtonBox::Cancel ), SIGNAL( clicked() ), this, SLOT( cancel() ) );
63-
connect( buttonBox->button( QDialogButtonBox::Reset ), SIGNAL( clicked() ), this, SLOT( reset() ) );
60+
connect( buttonBox->button( QDialogButtonBox::Ok ), &QAbstractButton::clicked, this, &QgsCustomizationDialog::ok );
61+
connect( buttonBox->button( QDialogButtonBox::Apply ), &QAbstractButton::clicked, this, &QgsCustomizationDialog::apply );
62+
connect( buttonBox->button( QDialogButtonBox::Cancel ), &QAbstractButton::clicked, this, &QgsCustomizationDialog::cancel );
63+
connect( buttonBox->button( QDialogButtonBox::Reset ), &QAbstractButton::clicked, this, &QgsCustomizationDialog::reset );
6464

6565
}
6666

‎src/app/qgsdecorationcopyrightdialog.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ QgsDecorationCopyrightDialog::QgsDecorationCopyrightDialog( QgsDecorationCopyrig
3333
restoreGeometry( settings.value( QStringLiteral( "Windows/DecorationCopyright/geometry" ) ).toByteArray() );
3434

3535
QPushButton *applyButton = buttonBox->button( QDialogButtonBox::Apply );
36-
connect( applyButton, SIGNAL( clicked() ), this, SLOT( apply() ) );
36+
connect( applyButton, &QAbstractButton::clicked, this, &QgsDecorationCopyrightDialog::apply );
3737

3838
grpEnable->setChecked( mDeco.enabled() );
3939
// text

‎src/app/qgsdecorationgriddialog.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ QgsDecorationGridDialog::QgsDecorationGridDialog( QgsDecorationGrid &deco, QWidg
6161

6262
updateGuiElements();
6363

64-
connect( buttonBox->button( QDialogButtonBox::Apply ), SIGNAL( clicked() ), this, SLOT( apply() ) );
64+
connect( buttonBox->button( QDialogButtonBox::Apply ), &QAbstractButton::clicked, this, &QgsDecorationGridDialog::apply );
6565

6666
}
6767

‎src/app/qgsdecorationnortharrowdialog.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ QgsDecorationNorthArrowDialog::QgsDecorationNorthArrowDialog( QgsDecorationNorth
3131
restoreGeometry( settings.value( QStringLiteral( "Windows/DecorationNorthArrow/geometry" ) ).toByteArray() );
3232

3333
QPushButton *applyButton = buttonBox->button( QDialogButtonBox::Apply );
34-
connect( applyButton, SIGNAL( clicked() ), this, SLOT( apply() ) );
34+
connect( applyButton, &QAbstractButton::clicked, this, &QgsDecorationNorthArrowDialog::apply );
3535

3636
// rotation
3737
rotatePixmap( mDeco.mRotationInt );

‎src/app/qgsdecorationscalebardialog.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ QgsDecorationScaleBarDialog::QgsDecorationScaleBarDialog( QgsDecorationScaleBar
3030
restoreGeometry( settings.value( QStringLiteral( "Windows/DecorationScaleBar/geometry" ) ).toByteArray() );
3131

3232
QPushButton *applyButton = buttonBox->button( QDialogButtonBox::Apply );
33-
connect( applyButton, SIGNAL( clicked() ), this, SLOT( apply() ) );
33+
connect( applyButton, &QAbstractButton::clicked, this, &QgsDecorationScaleBarDialog::apply );
3434

3535
// set the map units in the spin box
3636
spnSize->setShowClearButton( false );

‎src/app/qgsdxfexportdialog.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -440,10 +440,10 @@ QgsDxfExportDialog::QgsDxfExportDialog( QWidget *parent, Qt::WindowFlags f )
440440
mTreeView->resizeColumnToContents( 0 );
441441
mTreeView->header()->show();
442442

443-
connect( mFileLineEdit, SIGNAL( textChanged( const QString & ) ), this, SLOT( setOkEnabled() ) );
444-
connect( this, SIGNAL( accepted() ), this, SLOT( saveSettings() ) );
445-
connect( mSelectAllButton, SIGNAL( clicked() ), this, SLOT( selectAll() ) );
446-
connect( mDeselectAllButton, SIGNAL( clicked() ), this, SLOT( deSelectAll() ) );
443+
connect( mFileLineEdit, &QLineEdit::textChanged, this, &QgsDxfExportDialog::setOkEnabled );
444+
connect( this, &QDialog::accepted, this, &QgsDxfExportDialog::saveSettings );
445+
connect( mSelectAllButton, &QAbstractButton::clicked, this, &QgsDxfExportDialog::selectAll );
446+
connect( mDeselectAllButton, &QAbstractButton::clicked, this, &QgsDxfExportDialog::deSelectAll );
447447

448448
mFileLineEdit->setFocus();
449449

‎src/app/qgsfeatureaction.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,11 +84,11 @@ QgsAttributeDialog *QgsFeatureAction::newDialog( bool cloneFeature )
8484
QgsFeature &feat = const_cast<QgsFeature &>( *dialog->feature() );
8585
QgsFeatureAction *a = new QgsFeatureAction( action.name(), feat, mLayer, action.id(), -1, dialog );
8686
dialog->addAction( a );
87-
connect( a, SIGNAL( triggered() ), a, SLOT( execute() ) );
87+
connect( a, &QAction::triggered, a, &QgsFeatureAction::execute );
8888

8989
QAbstractButton *pb = dialog->findChild<QAbstractButton *>( action.name() );
9090
if ( pb )
91-
connect( pb, SIGNAL( clicked() ), a, SLOT( execute() ) );
91+
connect( pb, &QAbstractButton::clicked, a, &QgsFeatureAction::execute );
9292
}
9393
}
9494

@@ -207,7 +207,7 @@ bool QgsFeatureAction::addFeature( const QgsAttributeMap &defaultAttributes, boo
207207
dialog->setMode( QgsAttributeForm::AddFeatureMode );
208208
dialog->setEditCommandMessage( text() );
209209

210-
connect( dialog->attributeForm(), SIGNAL( featureSaved( const QgsFeature & ) ), this, SLOT( onFeatureSaved( const QgsFeature & ) ) );
210+
connect( dialog->attributeForm(), &QgsAttributeForm::featureSaved, this, &QgsFeatureAction::onFeatureSaved );
211211

212212
if ( !showModal )
213213
{

‎src/app/qgsfieldcalculator.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ QgsFieldCalculator::QgsFieldCalculator( QgsVectorLayer *vl, QWidget *parent )
5151
populateFields();
5252
populateOutputFieldTypes();
5353

54-
connect( builder, SIGNAL( expressionParsed( bool ) ), this, SLOT( setOkButtonState() ) );
55-
connect( mOutputFieldWidthSpinBox, SIGNAL( editingFinished() ), this, SLOT( setPrecisionMinMax() ) );
54+
connect( builder, &QgsExpressionBuilderWidget::expressionParsed, this, &QgsFieldCalculator::setOkButtonState );
55+
connect( mOutputFieldWidthSpinBox, &QAbstractSpinBox::editingFinished, this, &QgsFieldCalculator::setPrecisionMinMax );
5656

5757
QgsDistanceArea myDa;
5858
myDa.setSourceCrs( vl->crs() );

‎src/app/qgsfieldsproperties.cpp

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,11 @@ QgsFieldsProperties::QgsFieldsProperties( QgsVectorLayer *layer, QWidget *parent
6363
mToggleEditingButton->setIcon( QgsApplication::getThemeIcon( QStringLiteral( "/mActionToggleEditing.svg" ) ) );
6464
mCalculateFieldButton->setIcon( QgsApplication::getThemeIcon( QStringLiteral( "/mActionCalculateField.svg" ) ) );
6565

66-
connect( mToggleEditingButton, SIGNAL( clicked() ), this, SIGNAL( toggleEditing() ) );
67-
connect( mLayer, SIGNAL( editingStarted() ), this, SLOT( editingToggled() ) );
68-
connect( mLayer, SIGNAL( editingStopped() ), this, SLOT( editingToggled() ) );
69-
connect( mLayer, SIGNAL( attributeAdded( int ) ), this, SLOT( attributeAdded( int ) ) );
70-
connect( mLayer, SIGNAL( attributeDeleted( int ) ), this, SLOT( attributeDeleted( int ) ) );
66+
connect( mToggleEditingButton, &QAbstractButton::clicked, this, &QgsFieldsProperties::toggleEditing );
67+
connect( mLayer, &QgsVectorLayer::editingStarted, this, &QgsFieldsProperties::editingToggled );
68+
connect( mLayer, &QgsVectorLayer::editingStopped, this, &QgsFieldsProperties::editingToggled );
69+
connect( mLayer, &QgsVectorLayer::attributeAdded, this, &QgsFieldsProperties::attributeAdded );
70+
connect( mLayer, &QgsVectorLayer::attributeDeleted, this, &QgsFieldsProperties::attributeDeleted );
7171

7272
// tab and group display
7373
mAddItemButton->setEnabled( false );
@@ -100,8 +100,8 @@ QgsFieldsProperties::QgsFieldsProperties( QgsVectorLayer *layer, QWidget *parent
100100
mFieldsList->setSelectionMode( QAbstractItemView::ExtendedSelection );
101101
mFieldsList->verticalHeader()->hide();
102102

103-
connect( mDesignerTree, SIGNAL( itemSelectionChanged() ), this, SLOT( onAttributeSelectionChanged() ) );
104-
connect( mFieldsList, SIGNAL( itemSelectionChanged() ), this, SLOT( onAttributeSelectionChanged() ) );
103+
connect( mDesignerTree, &QTreeWidget::itemSelectionChanged, this, &QgsFieldsProperties::onAttributeSelectionChanged );
104+
connect( mFieldsList, &QTableWidget::itemSelectionChanged, this, &QgsFieldsProperties::onAttributeSelectionChanged );
105105

106106
mRelationsList = new DragList( mRelationsFrame );
107107
mRelationsFrameLayout->addWidget( mRelationsList );
@@ -262,7 +262,7 @@ void QgsFieldsProperties::loadAttributeEditorTree()
262262

263263
void QgsFieldsProperties::loadRows()
264264
{
265-
disconnect( mFieldsList, SIGNAL( cellChanged( int, int ) ), this, SLOT( attributesListCellChanged( int, int ) ) );
265+
disconnect( mFieldsList, &QTableWidget::cellChanged, this, &QgsFieldsProperties::attributesListCellChanged );
266266
const QgsFields &fields = mLayer->fields();
267267

268268
mIndexedWidgets.clear();
@@ -272,7 +272,7 @@ void QgsFieldsProperties::loadRows()
272272
attributeAdded( i );
273273

274274
mFieldsList->resizeColumnsToContents();
275-
connect( mFieldsList, SIGNAL( cellChanged( int, int ) ), this, SLOT( attributesListCellChanged( int, int ) ) );
275+
connect( mFieldsList, &QTableWidget::cellChanged, this, &QgsFieldsProperties::attributesListCellChanged );
276276
updateFieldRenamingStatus();
277277
}
278278

@@ -310,7 +310,7 @@ void QgsFieldsProperties::setRow( int row, int idx, const QgsField &field )
310310
QToolButton *editExpressionButton = new QToolButton;
311311
editExpressionButton->setProperty( "Index", idx );
312312
editExpressionButton->setIcon( QgsApplication::getThemeIcon( QStringLiteral( "/mIconExpression.svg" ) ) );
313-
connect( editExpressionButton, SIGNAL( clicked() ), this, SLOT( updateExpression() ) );
313+
connect( editExpressionButton, &QAbstractButton::clicked, this, &QgsFieldsProperties::updateExpression );
314314
expressionWidget->layout()->setContentsMargins( 0, 0, 0, 0 );
315315
expressionWidget->layout()->addWidget( editExpressionButton );
316316
expressionWidget->layout()->addWidget( new QLabel( mLayer->expressionField( idx ) ) );
@@ -343,7 +343,7 @@ void QgsFieldsProperties::setRow( int row, int idx, const QgsField &field )
343343
cfg.mButton = pb;
344344
mFieldsList->setCellWidget( row, AttrEditTypeCol, pb );
345345

346-
connect( pb, SIGNAL( pressed() ), this, SLOT( attributeTypeDialog() ) );
346+
connect( pb, &QAbstractButton::pressed, this, &QgsFieldsProperties::attributeTypeDialog );
347347

348348
setConfigForRow( row, cfg );
349349

@@ -1167,7 +1167,7 @@ DesignerTree::DesignerTree( QgsVectorLayer *layer, QWidget *parent )
11671167
: QTreeWidget( parent )
11681168
, mLayer( layer )
11691169
{
1170-
connect( this, SIGNAL( itemDoubleClicked( QTreeWidgetItem *, int ) ), this, SLOT( onItemDoubleClicked( QTreeWidgetItem *, int ) ) );
1170+
connect( this, &QTreeWidget::itemDoubleClicked, this, &DesignerTree::onItemDoubleClicked );
11711171
}
11721172

11731173
QTreeWidgetItem *DesignerTree::addItem( QTreeWidgetItem *parent, QgsFieldsProperties::DesignerTreeItemData data )
@@ -1370,8 +1370,8 @@ void DesignerTree::onItemDoubleClicked( QTreeWidgetItem *item, int column )
13701370
QDialogButtonBox *buttonBox = new QDialogButtonBox( QDialogButtonBox::Ok
13711371
| QDialogButtonBox::Cancel );
13721372

1373-
connect( buttonBox, SIGNAL( accepted() ), &dlg, SLOT( accept() ) );
1374-
connect( buttonBox, SIGNAL( rejected() ), &dlg, SLOT( reject() ) );
1373+
connect( buttonBox, &QDialogButtonBox::accepted, &dlg, &QDialog::accept );
1374+
connect( buttonBox, &QDialogButtonBox::rejected, &dlg, &QDialog::reject );
13751375

13761376
layout->addWidget( buttonBox );
13771377

@@ -1408,8 +1408,8 @@ void DesignerTree::onItemDoubleClicked( QTreeWidgetItem *item, int column )
14081408

14091409
QDialogButtonBox *buttonBox = new QDialogButtonBox( QDialogButtonBox::Ok | QDialogButtonBox::Cancel );
14101410

1411-
connect( buttonBox, SIGNAL( accepted() ), &dlg, SLOT( accept() ) );
1412-
connect( buttonBox, SIGNAL( rejected() ), &dlg, SLOT( reject() ) );
1411+
connect( buttonBox, &QDialogButtonBox::accepted, &dlg, &QDialog::accept );
1412+
connect( buttonBox, &QDialogButtonBox::rejected, &dlg, &QDialog::reject );
14131413

14141414
dlg.layout()->addWidget( buttonBox );
14151415

@@ -1434,8 +1434,8 @@ void DesignerTree::onItemDoubleClicked( QTreeWidgetItem *item, int column )
14341434
QDialogButtonBox *buttonBox = new QDialogButtonBox( QDialogButtonBox::Ok
14351435
| QDialogButtonBox::Cancel );
14361436

1437-
connect( buttonBox, SIGNAL( accepted() ), &dlg, SLOT( accept() ) );
1438-
connect( buttonBox, SIGNAL( rejected() ), &dlg, SLOT( reject() ) );
1437+
connect( buttonBox, &QDialogButtonBox::accepted, &dlg, &QDialog::accept );
1438+
connect( buttonBox, &QDialogButtonBox::rejected, &dlg, &QDialog::reject );
14391439

14401440
dlg.layout()->addWidget( buttonBox );
14411441

‎src/app/qgsguivectorlayertools.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,8 +178,8 @@ void QgsGuiVectorLayerTools::commitError( QgsVectorLayer *vlayer ) const
178178
showMore->setSizePolicy( QSizePolicy::Maximum, QSizePolicy::Preferred );
179179
showMore->addAction( act );
180180
showMore->setDefaultAction( act );
181-
connect( showMore, SIGNAL( triggered( QAction * ) ), mv, SLOT( exec() ) );
182-
connect( showMore, SIGNAL( triggered( QAction * ) ), showMore, SLOT( deleteLater() ) );
181+
connect( showMore, &QToolButton::triggered, mv, &QDialog::exec );
182+
connect( showMore, &QToolButton::triggered, showMore, &QObject::deleteLater );
183183

184184
// no timeout set, since notice needs attention and is only shown first time layer is labeled
185185
QgsMessageBarItem *errorMsg = new QgsMessageBarItem(

‎src/app/qgshandlebadlayers.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,9 @@ QgsHandleBadLayers::QgsHandleBadLayers( const QList<QDomNode> &layers )
7272
buttonBox->addButton( mBrowseButton, QDialogButtonBox::ActionRole );
7373
mBrowseButton->setDisabled( true );
7474

75-
connect( mLayerList, SIGNAL( itemSelectionChanged() ), this, SLOT( selectionChanged() ) );
76-
connect( mBrowseButton, SIGNAL( clicked() ), this, SLOT( browseClicked() ) );
77-
connect( buttonBox->button( QDialogButtonBox::Apply ), SIGNAL( clicked() ), this, SLOT( apply() ) );
75+
connect( mLayerList, &QTableWidget::itemSelectionChanged, this, &QgsHandleBadLayers::selectionChanged );
76+
connect( mBrowseButton, &QAbstractButton::clicked, this, &QgsHandleBadLayers::browseClicked );
77+
connect( buttonBox->button( QDialogButtonBox::Apply ), &QAbstractButton::clicked, this, &QgsHandleBadLayers::apply );
7878

7979
mLayerList->clear();
8080
mLayerList->setSortingEnabled( true );
@@ -133,7 +133,7 @@ QgsHandleBadLayers::QgsHandleBadLayers( const QList<QDomNode> &layers )
133133
btn->setMinimumHeight( 24 );
134134
btn->setText( tr( "Edit" ) );
135135
btn->setProperty( "row", j );
136-
connect( btn, SIGNAL( clicked() ), this, SLOT( editAuthCfg() ) );
136+
connect( btn, &QAbstractButton::clicked, this, &QgsHandleBadLayers::editAuthCfg );
137137
mLayerList->setCellWidget( j, 3, btn );
138138
}
139139
else

0 commit comments

Comments
 (0)
Please sign in to comment.