Use 4arg connect
This commit is contained in:
@@ -708,7 +708,7 @@ void FancyTabWidget::addMenuItem(QActionGroup *group, const QString &text, Mode
|
|||||||
|
|
||||||
QAction *action = group->addAction(text);
|
QAction *action = group->addAction(text);
|
||||||
action->setCheckable(true);
|
action->setCheckable(true);
|
||||||
QObject::connect(action, &QAction::triggered, [this, mode]() { SetMode(mode); });
|
QObject::connect(action, &QAction::triggered, this, [this, mode]() { SetMode(mode); });
|
||||||
|
|
||||||
if (mode == mode_) action->setChecked(true);
|
if (mode == mode_) action->setChecked(true);
|
||||||
|
|
||||||
|
|||||||
@@ -216,7 +216,7 @@ void PlayingWidget::CreateModeAction(const Mode mode, const QString &text, QActi
|
|||||||
|
|
||||||
QAction *action = new QAction(text, group);
|
QAction *action = new QAction(text, group);
|
||||||
action->setCheckable(true);
|
action->setCheckable(true);
|
||||||
QObject::connect(action, &QAction::triggered, [this, mode]() { SetMode(mode); });
|
QObject::connect(action, &QAction::triggered, this, [this, mode]() { SetMode(mode); });
|
||||||
|
|
||||||
if (mode == mode_) action->setChecked(true);
|
if (mode == mode_) action->setChecked(true);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user