Use 4arg connect

This commit is contained in:
Jonas Kvinge 2021-08-25 02:55:00 +02:00
parent 709a706853
commit 336c6cdd9d
4 changed files with 4 additions and 4 deletions

View File

@ -236,6 +236,6 @@ void AnalyzerContainer::AddFramerate(const QString &name, const int framerate) {
group_framerate_->addAction(action);
framerate_list_ << framerate;
action->setCheckable(true);
QObject::connect(action, &QAction::triggered, [this, framerate]() { ChangeFramerate(framerate); } );
QObject::connect(action, &QAction::triggered, this, [this, framerate]() { ChangeFramerate(framerate); } );
}

View File

@ -165,7 +165,7 @@ void CollectionFilterWidget::Init(CollectionModel *model) {
QList<QAction*> filter_ages = filter_ages_.keys();
for (QAction *action : filter_ages) {
int age = filter_ages_[action];
QObject::connect(action, &QAction::triggered, [this, age]() { model_->SetFilterAge(age); } );
QObject::connect(action, &QAction::triggered, this, [this, age]() { model_->SetFilterAge(age); } );
}
// Load settings

View File

@ -136,7 +136,7 @@ void PlaylistHeader::AddColumnAction(int index) {
action->setChecked(!isSectionHidden(index));
show_actions_ << action;
QObject::connect(action, &QAction::triggered, [this, index]() { ToggleVisible(index); });
QObject::connect(action, &QAction::triggered, this, [this, index]() { ToggleVisible(index); });
}

View File

@ -139,7 +139,7 @@ void SmartPlaylistWizard::AddPlugin(SmartPlaylistWizardPlugin *plugin) {
type_page_->layout()->addWidget(radio_button);
type_page_->layout()->addWidget(description);
QObject::connect(radio_button, &QRadioButton::clicked, [this, index]() { TypeChanged(index); });
QObject::connect(radio_button, &QRadioButton::clicked, this, [this, index]() { TypeChanged(index); });
if (index == 0) {
radio_button->setChecked(true);