Connection syntax migration (#637)

This commit is contained in:
Jonas Kvinge
2021-01-26 16:48:04 +01:00
committed by GitHub
parent d57f6303f4
commit bf7c8df353
362 changed files with 2452 additions and 2434 deletions

View File

@@ -56,14 +56,13 @@
TrackSelectionDialog::TrackSelectionDialog(QWidget *parent)
: QDialog(parent),
ui_(new Ui_TrackSelectionDialog),
save_on_close_(false)
{
save_on_close_(false) {
// Setup dialog window
ui_->setupUi(this);
connect(ui_->song_list, SIGNAL(currentRowChanged(int)), SLOT(UpdateStack()));
connect(ui_->results, SIGNAL(currentItemChanged(QTreeWidgetItem*,QTreeWidgetItem*)), SLOT(ResultSelected()));
QObject::connect(ui_->song_list, &QListWidget::currentRowChanged, this, &TrackSelectionDialog::UpdateStack);
QObject::connect(ui_->results, &QTreeWidget::currentItemChanged, this, &TrackSelectionDialog::ResultSelected);
ui_->splitter->setSizes(QList<int>() << 200 << width() - 200);
SetLoading(QString());
@@ -74,8 +73,8 @@ TrackSelectionDialog::TrackSelectionDialog(QWidget *parent)
ui_->button_box->addButton(previous_button_, QDialogButtonBox::ResetRole);
ui_->button_box->addButton(next_button_, QDialogButtonBox::ResetRole);
connect(previous_button_, SIGNAL(clicked()), SLOT(PreviousSong()));
connect(next_button_, SIGNAL(clicked()), SLOT(NextSong()));
QObject::connect(previous_button_, &QPushButton::clicked, this, &TrackSelectionDialog::PreviousSong);
QObject::connect(next_button_, &QPushButton::clicked, this, &TrackSelectionDialog::NextSong);
// Set some shortcuts for the buttons
new QShortcut(QKeySequence::Back, previous_button_, SLOT(click()));
@@ -294,7 +293,7 @@ void TrackSelectionDialog::accept() {
QFuture<void> future = QtConcurrent::run(&TrackSelectionDialog::SaveData, data_);
QFutureWatcher<void> *watcher = new QFutureWatcher<void>(this);
watcher->setFuture(future);
connect(watcher, SIGNAL(finished()), SLOT(AcceptFinished()));
QObject::connect(watcher, &QFutureWatcher<void>::finished, this, &TrackSelectionDialog::AcceptFinished);
return;
}