From 60528525e0d5d2ece434a3adde855ecb59b7cefc Mon Sep 17 00:00:00 2001 From: Jonas Kvinge Date: Fri, 29 Jan 2021 18:53:20 +0100 Subject: [PATCH] Use QObject::connect() everywhere for consistency --- src/core/mainwindow.cpp | 4 ++-- src/dialogs/edittagdialog.cpp | 2 +- src/playlist/playlist.cpp | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/core/mainwindow.cpp b/src/core/mainwindow.cpp index ea44f08da..faef6a1d5 100644 --- a/src/core/mainwindow.cpp +++ b/src/core/mainwindow.cpp @@ -2065,7 +2065,7 @@ void MainWindow::RenumberTracks() { song.set_track(track); TagReaderReply *reply = TagReaderClient::Instance()->SaveFile(song.url().toLocalFile(), song); QPersistentModelIndex persistent_index = QPersistentModelIndex(source_index); - connect(reply, &TagReaderReply::Finished, this, [this, reply, persistent_index]() { SongSaveComplete(reply, persistent_index); }); + QObject::connect(reply, &TagReaderReply::Finished, this, [this, reply, persistent_index]() { SongSaveComplete(reply, persistent_index); }); } ++track; } @@ -2096,7 +2096,7 @@ void MainWindow::SelectionSetValue() { if (Playlist::set_column_value(song, column, column_value)) { TagReaderReply *reply = TagReaderClient::Instance()->SaveFile(song.url().toLocalFile(), song); QPersistentModelIndex persistent_index = QPersistentModelIndex(source_index); - connect(reply, &TagReaderReply::Finished, this, [this, reply, persistent_index]() { SongSaveComplete(reply, persistent_index); }); + QObject::connect(reply, &TagReaderReply::Finished, this, [this, reply, persistent_index]() { SongSaveComplete(reply, persistent_index); }); } } diff --git a/src/dialogs/edittagdialog.cpp b/src/dialogs/edittagdialog.cpp index 316dd47bb..d8426aa70 100644 --- a/src/dialogs/edittagdialog.cpp +++ b/src/dialogs/edittagdialog.cpp @@ -776,7 +776,7 @@ void EditTagDialog::SaveData(const QList &tag_data) { ++pending_; TagReaderReply *reply = TagReaderClient::Instance()->SaveFile(ref.current_.url().toLocalFile(), ref.current_); - connect(reply, &TagReaderReply::Finished, this, [this, reply, ref]() { SongSaveComplete(reply, ref.current_.url().toLocalFile(), ref.current_); }); + QObject::connect(reply, &TagReaderReply::Finished, this, [this, reply, ref]() { SongSaveComplete(reply, ref.current_.url().toLocalFile(), ref.current_); }); } diff --git a/src/playlist/playlist.cpp b/src/playlist/playlist.cpp index 6d4d96b44..482f7d152 100644 --- a/src/playlist/playlist.cpp +++ b/src/playlist/playlist.cpp @@ -393,7 +393,7 @@ bool Playlist::setData(const QModelIndex &idx, const QVariant &value, int role) TagReaderReply *reply = TagReaderClient::Instance()->SaveFile(song.url().toLocalFile(), song); QPersistentModelIndex persistent_index = QPersistentModelIndex(idx); - connect(reply, &TagReaderReply::Finished, this, [this, reply, persistent_index]() { SongSaveComplete(reply, persistent_index); }); + QObject::connect(reply, &TagReaderReply::Finished, this, [this, reply, persistent_index]() { SongSaveComplete(reply, persistent_index); }); return true;