@@ -37,32 +37,30 @@ MainWindow::MainWindow(QWidget *parent) :
3737 _exceptionGroup.addButton (_pUi->chkGatewayPathUnavailable , QModbusPdu::GatewayPathUnavailable);
3838
3939 connect (&_exceptionGroup, QOverload<int , bool >::of (&QButtonGroup::idToggled), this ,
40- [= ](int id, bool checked){
41- if (checked)
42- {
43- _pSlaveModbus->setException (static_cast <QModbusPdu::ExceptionCode>(id));
44- }
45- });
40+ [=, this ](int id, bool checked) {
41+ if (checked)
42+ {
43+ _pSlaveModbus->setException (static_cast <QModbusPdu::ExceptionCode>(id));
44+ }
45+ });
4646
4747 /* * Handle error recurrence group **/
4848 _bErrorOnce = true ;
4949 _errorRecurrenceGroup.addButton (_pUi->optErrorOnce , true );
5050 _errorRecurrenceGroup.addButton (_pUi->optErrorPersistent , false );
5151
5252 connect (&_errorRecurrenceGroup, QOverload<int >::of (&QButtonGroup::idClicked), this ,
53- [=](int id){
54- _bErrorOnce = static_cast <bool >(id);
55- });
53+ [=, this ](int id) { _bErrorOnce = static_cast <bool >(id); });
5654
5755 connect (_pSlaveModbus, &TestSlaveModbus::requestProcessed, this , &MainWindow::handleRequestProcessed);
5856
5957 /* * Auto increment **/
6058 _bAutoInc = false ;
61- connect (_pUi-> checkAutoIncrement , &QCheckBox::stateChanged, this ,
62- [=]( int state){
63- _bAutoInc = ( state == Qt::Checked) ;
64- _pIncGraph->setState (_bAutoInc);
65- });
59+
60+ connect (_pUi-> checkAutoIncrement , &QCheckBox::checkStateChanged, this , [ this ](Qt::CheckState state) {
61+ _bAutoInc = state;
62+ _pIncGraph->setState (_bAutoInc);
63+ });
6664
6765 /* * Setup registerView **/
6866 _pUi->tblRegData ->setModel (_pRegisterDataModel);
0 commit comments