Use of QButtonGroup::buttonClicked has been deprecated since Qt 5.15.

This commit is contained in:
Roman Telezhynskyi 2020-07-08 11:29:40 +03:00
parent e31a22654e
commit 158edcc093
3 changed files with 17 additions and 0 deletions

View File

@ -83,7 +83,11 @@ DialogExportToCSV::DialogExportToCSV(QWidget *parent)
connect(ui->comboBoxCodec, QOverload<int>::of(&QComboBox::currentIndexChanged), this, [this](){ShowPreview();}); connect(ui->comboBoxCodec, QOverload<int>::of(&QComboBox::currentIndexChanged), this, [this](){ShowPreview();});
connect(ui->checkBoxWithHeader, &QCheckBox::stateChanged, this, [this](){ShowPreview();}); connect(ui->checkBoxWithHeader, &QCheckBox::stateChanged, this, [this](){ShowPreview();});
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
connect(ui->buttonGroup, QOverload<int>::of(&QButtonGroup::buttonClicked), this, [this](){ShowPreview();}); connect(ui->buttonGroup, QOverload<int>::of(&QButtonGroup::buttonClicked), this, [this](){ShowPreview();});
#else
connect(ui->buttonGroup, &QButtonGroup::idClicked, this, [this](){ShowPreview();});
#endif
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------

View File

@ -1154,10 +1154,16 @@ void DialogPiecePath::InitPassmarksTab()
connect(ui->comboBoxPassmarks, QOverload<int>::of(&QComboBox::currentIndexChanged), connect(ui->comboBoxPassmarks, QOverload<int>::of(&QComboBox::currentIndexChanged),
this, &DialogPiecePath::PassmarkChanged); this, &DialogPiecePath::PassmarkChanged);
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
connect(ui->buttonGroupMarkType, QOverload<int>::of(&QButtonGroup::buttonClicked), connect(ui->buttonGroupMarkType, QOverload<int>::of(&QButtonGroup::buttonClicked),
this, &DialogPiecePath::PassmarkLineTypeChanged); this, &DialogPiecePath::PassmarkLineTypeChanged);
connect(ui->buttonGroupAngleType, QOverload<int>::of(&QButtonGroup::buttonClicked), connect(ui->buttonGroupAngleType, QOverload<int>::of(&QButtonGroup::buttonClicked),
this, &DialogPiecePath::PassmarkAngleTypeChanged); this, &DialogPiecePath::PassmarkAngleTypeChanged);
#else
connect(ui->buttonGroupMarkType, &QButtonGroup::idClicked, this, &DialogPiecePath::PassmarkLineTypeChanged);
connect(ui->buttonGroupAngleType, &QButtonGroup::idClicked, this, &DialogPiecePath::PassmarkAngleTypeChanged);
#endif
connect(ui->checkBoxShowSecondPassmark, &QCheckBox::stateChanged, this, connect(ui->checkBoxShowSecondPassmark, &QCheckBox::stateChanged, this,
&DialogPiecePath::PassmarkShowSecondChanged); &DialogPiecePath::PassmarkShowSecondChanged);
connect(ui->toolButtonExprLength, &QPushButton::clicked, this, &DialogPiecePath::FXPassmarkLength); connect(ui->toolButtonExprLength, &QPushButton::clicked, this, &DialogPiecePath::FXPassmarkLength);

View File

@ -3190,10 +3190,17 @@ void DialogSeamAllowance::InitPassmarksTab()
connect(uiTabPassmarks->comboBoxPassmarks, QOverload<int>::of(&QComboBox::currentIndexChanged), connect(uiTabPassmarks->comboBoxPassmarks, QOverload<int>::of(&QComboBox::currentIndexChanged),
this, &DialogSeamAllowance::PassmarkChanged); this, &DialogSeamAllowance::PassmarkChanged);
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
connect(uiTabPassmarks->buttonGroupLineType, QOverload<int>::of(&QButtonGroup::buttonClicked), connect(uiTabPassmarks->buttonGroupLineType, QOverload<int>::of(&QButtonGroup::buttonClicked),
this, &DialogSeamAllowance::PassmarkLineTypeChanged); this, &DialogSeamAllowance::PassmarkLineTypeChanged);
connect(uiTabPassmarks->buttonGroupAngleType, QOverload<int>::of(&QButtonGroup::buttonClicked), connect(uiTabPassmarks->buttonGroupAngleType, QOverload<int>::of(&QButtonGroup::buttonClicked),
this, &DialogSeamAllowance::PassmarkAngleTypeChanged); this, &DialogSeamAllowance::PassmarkAngleTypeChanged);
#else
connect(uiTabPassmarks->buttonGroupLineType, &QButtonGroup::idClicked,
this, &DialogSeamAllowance::PassmarkLineTypeChanged);
connect(uiTabPassmarks->buttonGroupAngleType, &QButtonGroup::idClicked,
this, &DialogSeamAllowance::PassmarkAngleTypeChanged);
#endif
connect(uiTabPassmarks->checkBoxShowSecondPassmark, &QCheckBox::stateChanged, this, connect(uiTabPassmarks->checkBoxShowSecondPassmark, &QCheckBox::stateChanged, this,
&DialogSeamAllowance::PassmarkShowSecondChanged); &DialogSeamAllowance::PassmarkShowSecondChanged);
connect(uiTabPassmarks->toolButtonExprLength, &QPushButton::clicked, this, &DialogSeamAllowance::FXPassmarkLength); connect(uiTabPassmarks->toolButtonExprLength, &QPushButton::clicked, this, &DialogSeamAllowance::FXPassmarkLength);