@@ -59,18 +59,18 @@ QgsGeometryCheckerResultTab::QgsGeometryCheckerResultTab( QgisInterface *iface,
5959 ui.comboBoxMergeAttribute ->addItem ( mFeaturePool ->getLayer ()->fields ().at ( i ).name () );
6060 }
6161
62- connect ( checker, SIGNAL ( errorAdded ( QgsGeometryCheckError * ) ) , this , SLOT ( addError ( QgsGeometryCheckError * ) ) );
63- connect ( checker, SIGNAL ( errorUpdated ( QgsGeometryCheckError *, bool ) ), this , SLOT ( updateError ( QgsGeometryCheckError *, bool ) ) );
64- connect ( ui.comboBoxMergeAttribute , SIGNAL ( currentIndexChanged ( int ) ), checker, SLOT ( setMergeAttributeIndex ( int ) ) );
65- connect ( ui.tableWidgetErrors ->selectionModel (), SIGNAL ( selectionChanged ( QItemSelection, QItemSelection ) ), this , SLOT ( onSelectionChanged ( QItemSelection, QItemSelection ) ) );
66- connect ( ui.buttonGroupSelectAction , SIGNAL ( buttonClicked ( int ) ), this , SLOT ( highlightErrors () ) );
67- connect ( ui.pushButtonOpenAttributeTable , SIGNAL ( clicked () ) , this , SLOT ( openAttributeTable () ) );
68- connect ( ui.pushButtonFixWithDefault , SIGNAL ( clicked () ) , this , SLOT ( fixErrorsWithDefault () ) );
69- connect ( ui.pushButtonFixWithPrompt , SIGNAL ( clicked () ) , this , SLOT ( fixErrorsWithPrompt () ) );
70- connect ( ui.pushButtonErrorResolutionSettings , SIGNAL ( clicked () ) , this , SLOT ( setDefaultResolutionMethods () ) );
71- connect ( ui.checkBoxHighlight , SIGNAL ( clicked () ) , this , SLOT ( highlightErrors () ) );
72- connect ( QgsProject::instance (), SIGNAL ( layersWillBeRemoved ( QStringList ) ), this , SLOT ( checkRemovedLayer ( QStringList ) ) );
73- connect ( ui.pushButtonExport , SIGNAL ( clicked () ) , this , SLOT ( exportErrors () ) );
62+ connect ( checker, &QgsGeometryChecker:: errorAdded, this , &QgsGeometryCheckerResultTab:: addError );
63+ connect ( checker, &QgsGeometryChecker:: errorUpdated, this , &QgsGeometryCheckerResultTab:: updateError );
64+ connect ( ui.comboBoxMergeAttribute , static_cast < void ( QComboBox::* ) ( int )>( &QComboBox::currentIndexChanged ), checker, &QgsGeometryChecker:: setMergeAttributeIndex );
65+ connect ( ui.tableWidgetErrors ->selectionModel (), &QItemSelectionModel:: selectionChanged, this , &QgsGeometryCheckerResultTab:: onSelectionChanged );
66+ connect ( ui.buttonGroupSelectAction , static_cast < void ( QButtonGroup::* ) ( int )>( &QButtonGroup::buttonClicked ), this , &QgsGeometryCheckerResultTab:: highlightErrors );
67+ connect ( ui.pushButtonOpenAttributeTable , &QAbstractButton:: clicked, this , &QgsGeometryCheckerResultTab:: openAttributeTable );
68+ connect ( ui.pushButtonFixWithDefault , &QAbstractButton:: clicked, this , &QgsGeometryCheckerResultTab:: fixErrorsWithDefault );
69+ connect ( ui.pushButtonFixWithPrompt , &QAbstractButton:: clicked, this , &QgsGeometryCheckerResultTab:: fixErrorsWithPrompt );
70+ connect ( ui.pushButtonErrorResolutionSettings , &QAbstractButton:: clicked, this , &QgsGeometryCheckerResultTab:: setDefaultResolutionMethods );
71+ connect ( ui.checkBoxHighlight , &QAbstractButton:: clicked, this , &QgsGeometryCheckerResultTab:: highlightErrors );
72+ connect ( QgsProject::instance (), static_cast < void ( QgsProject::* )( const QStringList & )>( &QgsProject::layersWillBeRemoved ), this , &QgsGeometryCheckerResultTab:: checkRemovedLayer );
73+ connect ( ui.pushButtonExport , &QAbstractButton:: clicked, this , &QgsGeometryCheckerResultTab:: exportErrors );
7474
7575 if ( ( mFeaturePool ->getLayer ()->dataProvider ()->capabilities () & QgsVectorDataProvider::ChangeGeometries ) == 0 )
7676 {
@@ -105,8 +105,8 @@ void QgsGeometryCheckerResultTab::finalize()
105105 dialog.layout ()->addWidget ( new QPlainTextEdit ( mChecker ->getMessages ().join ( QStringLiteral ( " \n " ) ) ) );
106106 QDialogButtonBox *bbox = new QDialogButtonBox ( QDialogButtonBox::Close, Qt::Horizontal );
107107 dialog.layout ()->addWidget ( bbox );
108- connect ( bbox, SIGNAL ( accepted () ) , &dialog, SLOT ( accept () ) );
109- connect ( bbox, SIGNAL ( rejected () ) , &dialog, SLOT ( reject () ) );
108+ connect ( bbox, &QDialogButtonBox:: accepted, &dialog, &QDialog:: accept );
109+ connect ( bbox, &QDialogButtonBox:: rejected, &dialog, &QDialog:: reject );
110110 dialog.setWindowTitle ( tr ( " Check errors occurred" ) );
111111 dialog.exec ();
112112 }
@@ -442,11 +442,11 @@ void QgsGeometryCheckerResultTab::openAttributeTable()
442442 }
443443 if ( mAttribTableDialog )
444444 {
445- disconnect ( mAttribTableDialog , SIGNAL ( destroyed () ) , this , SLOT ( clearAttribTableDialog () ) );
445+ disconnect ( mAttribTableDialog , &QObject:: destroyed, this , &QgsGeometryCheckerResultTab:: clearAttribTableDialog );
446446 mAttribTableDialog ->close ();
447447 }
448448 mAttribTableDialog = mIface ->showAttributeTable ( mFeaturePool ->getLayer (), expr.join ( QStringLiteral ( " or " ) ) );
449- connect ( mAttribTableDialog , SIGNAL ( destroyed () ) , this , SLOT ( clearAttribTableDialog () ) );
449+ connect ( mAttribTableDialog , &QObject:: destroyed, this , &QgsGeometryCheckerResultTab:: clearAttribTableDialog );
450450}
451451
452452void QgsGeometryCheckerResultTab::fixErrors ( bool prompt )
@@ -489,8 +489,8 @@ void QgsGeometryCheckerResultTab::fixErrors( bool prompt )
489489 {
490490 QgsGeometryCheckerFixDialog fixdialog ( mChecker , errors, mIface , mIface ->mainWindow () );
491491 QEventLoop loop;
492- connect ( &fixdialog, SIGNAL ( currentErrorChanged ( QgsGeometryCheckError * ) ) , this , SLOT ( highlightError ( QgsGeometryCheckError * ) ) );
493- connect ( &fixdialog, SIGNAL ( finished ( int ) ) , &loop, SLOT ( quit () ) );
492+ connect ( &fixdialog, &QgsGeometryCheckerFixDialog:: currentErrorChanged, this , &QgsGeometryCheckerResultTab:: highlightError );
493+ connect ( &fixdialog, &QDialog:: finished, &loop, &QEventLoop:: quit );
494494 fixdialog.show ();
495495 parentWidget ()->parentWidget ()->parentWidget ()->setEnabled ( false );
496496 loop.exec ();
@@ -519,8 +519,8 @@ void QgsGeometryCheckerResultTab::fixErrors( bool prompt )
519519 {
520520 QgsGeometryCheckerFixSummaryDialog summarydialog ( mIface , mFeaturePool ->getLayer (), mStatistics , mChecker ->getMessages (), mIface ->mainWindow () );
521521 QEventLoop loop;
522- connect ( &summarydialog, SIGNAL ( errorSelected ( QgsGeometryCheckError * ) ) , this , SLOT ( highlightError ( QgsGeometryCheckError * ) ) );
523- connect ( &summarydialog, SIGNAL ( finished ( int ) ) , &loop, SLOT ( quit () ) );
522+ connect ( &summarydialog, &QgsGeometryCheckerFixSummaryDialog:: errorSelected, this , &QgsGeometryCheckerResultTab:: highlightError );
523+ connect ( &summarydialog, &QDialog:: finished, &loop, &QEventLoop:: quit );
524524 summarydialog.show ();
525525 parentWidget ()->parentWidget ()->parentWidget ()->setEnabled ( false );
526526 loop.exec ();
@@ -578,14 +578,14 @@ void QgsGeometryCheckerResultTab::setDefaultResolutionMethods()
578578 groupBoxLayout->addWidget ( radio );
579579 radioGroup->addButton ( radio, id++ );
580580 }
581- connect ( radioGroup, SIGNAL ( buttonClicked ( int ) ), this , SLOT ( storeDefaultResolutionMethod ( int ) ) );
581+ connect ( radioGroup, static_cast < void ( QButtonGroup::* ) ( int )>( &QButtonGroup::buttonClicked ), this , &QgsGeometryCheckerResultTab:: storeDefaultResolutionMethod );
582582
583583 scrollAreaLayout->addWidget ( groupBox );
584584 }
585585 scrollArea->setWidget ( scrollAreaContents );
586586
587587 QDialogButtonBox *buttonBox = new QDialogButtonBox ( QDialogButtonBox::Ok, Qt::Horizontal, &dialog );
588- connect ( buttonBox, SIGNAL ( accepted () ) , &dialog, SLOT ( accept () ) );
588+ connect ( buttonBox, &QDialogButtonBox:: accepted, &dialog, &QDialog:: accept );
589589 layout->addWidget ( buttonBox );
590590 dialog.exec ();
591591}
0 commit comments