diff --git a/ext/libstrawberry-common/core/workerpool.h b/ext/libstrawberry-common/core/workerpool.h index 1885bd5d..7dc161fb 100644 --- a/ext/libstrawberry-common/core/workerpool.h +++ b/ext/libstrawberry-common/core/workerpool.h @@ -228,7 +228,7 @@ void WorkerPool::SetExecutableName(const QString &executable_name) template void WorkerPool::Start() { - QMetaObject::invokeMethod(this, "DoStart"); + QMetaObject::invokeMethod(this, &WorkerPool::DoStart); } template @@ -423,7 +423,7 @@ WorkerPool::SendMessageWithReply(MessageType *message) { } // Wake up the main thread - QMetaObject::invokeMethod(this, "SendQueuedMessages", Qt::QueuedConnection); + QMetaObject::invokeMethod(this, &WorkerPool::SendQueuedMessages, Qt::QueuedConnection); return reply; diff --git a/src/collection/collectionbackend.cpp b/src/collection/collectionbackend.cpp index 3c43ee03..4cd1b068 100644 --- a/src/collection/collectionbackend.cpp +++ b/src/collection/collectionbackend.cpp @@ -89,7 +89,7 @@ void CollectionBackend::Close() { } void CollectionBackend::ExitAsync() { - QMetaObject::invokeMethod(this, "Exit", Qt::QueuedConnection); + QMetaObject::invokeMethod(this, &CollectionBackend::Exit, Qt::QueuedConnection); } void CollectionBackend::Exit() { @@ -115,19 +115,19 @@ void CollectionBackend::ReportErrors(const CollectionQuery &query) { } void CollectionBackend::LoadDirectoriesAsync() { - QMetaObject::invokeMethod(this, "LoadDirectories", Qt::QueuedConnection); + QMetaObject::invokeMethod(this, &CollectionBackend::LoadDirectories, Qt::QueuedConnection); } void CollectionBackend::UpdateTotalSongCountAsync() { - QMetaObject::invokeMethod(this, "UpdateTotalSongCount", Qt::QueuedConnection); + QMetaObject::invokeMethod(this, &CollectionBackend::UpdateTotalSongCount, Qt::QueuedConnection); } void CollectionBackend::UpdateTotalArtistCountAsync() { - QMetaObject::invokeMethod(this, "UpdateTotalArtistCount", Qt::QueuedConnection); + QMetaObject::invokeMethod(this, &CollectionBackend::UpdateTotalArtistCount, Qt::QueuedConnection); } void CollectionBackend::UpdateTotalAlbumCountAsync() { - QMetaObject::invokeMethod(this, "UpdateTotalAlbumCount", Qt::QueuedConnection); + QMetaObject::invokeMethod(this, &CollectionBackend::UpdateTotalAlbumCount, Qt::QueuedConnection); } void CollectionBackend::IncrementPlayCountAsync(const int id) { @@ -1825,7 +1825,7 @@ bool CollectionBackend::ResetPlayStatistics(const QStringList &id_str_list) { void CollectionBackend::DeleteAllAsync() { - QMetaObject::invokeMethod(this, "DeleteAll", Qt::QueuedConnection); + QMetaObject::invokeMethod(this, &CollectionBackend::DeleteAll, Qt::QueuedConnection); } diff --git a/src/collection/collectionwatcher.cpp b/src/collection/collectionwatcher.cpp index d9b7e945..06318557 100644 --- a/src/collection/collectionwatcher.cpp +++ b/src/collection/collectionwatcher.cpp @@ -115,7 +115,7 @@ CollectionWatcher::CollectionWatcher(Song::Source source, QObject *parent) } void CollectionWatcher::ExitAsync() { - QMetaObject::invokeMethod(this, "Exit", Qt::QueuedConnection); + QMetaObject::invokeMethod(this, &CollectionWatcher::Exit, Qt::QueuedConnection); } void CollectionWatcher::Exit() { @@ -131,7 +131,7 @@ void CollectionWatcher::Exit() { void CollectionWatcher::ReloadSettingsAsync() { - QMetaObject::invokeMethod(this, "ReloadSettings", Qt::QueuedConnection); + QMetaObject::invokeMethod(this, &CollectionWatcher::ReloadSettings, Qt::QueuedConnection); } @@ -1118,13 +1118,13 @@ void CollectionWatcher::SetRescanPaused(bool pause) { void CollectionWatcher::IncrementalScanAsync() { - QMetaObject::invokeMethod(this, "IncrementalScanNow", Qt::QueuedConnection); + QMetaObject::invokeMethod(this, &CollectionWatcher::IncrementalScanNow, Qt::QueuedConnection); } void CollectionWatcher::FullScanAsync() { - QMetaObject::invokeMethod(this, "FullScanNow", Qt::QueuedConnection); + QMetaObject::invokeMethod(this, &CollectionWatcher::FullScanNow, Qt::QueuedConnection); } diff --git a/src/core/database.cpp b/src/core/database.cpp index dba76bda..bbf8fd1d 100644 --- a/src/core/database.cpp +++ b/src/core/database.cpp @@ -91,7 +91,7 @@ Database::~Database() { } void Database::ExitAsync() { - QMetaObject::invokeMethod(this, "Exit", Qt::QueuedConnection); + QMetaObject::invokeMethod(this, &Database::Exit, Qt::QueuedConnection); } void Database::Exit() { diff --git a/src/core/songloader.cpp b/src/core/songloader.cpp index 71153fe2..82a7f8a3 100644 --- a/src/core/songloader.cpp +++ b/src/core/songloader.cpp @@ -735,7 +735,7 @@ void SongLoader::StopTypefindAsync(const bool success) { state_ = State::Finished; success_ = success; - QMetaObject::invokeMethod(this, "StopTypefind", Qt::QueuedConnection); + QMetaObject::invokeMethod(this, &SongLoader::StopTypefind, Qt::QueuedConnection); } #endif @@ -746,7 +746,7 @@ void SongLoader::ScheduleTimeoutAsync() { ScheduleTimeout(); } else { - QMetaObject::invokeMethod(this, "ScheduleTimeout", Qt::QueuedConnection); + QMetaObject::invokeMethod(this, &SongLoader::ScheduleTimeout, Qt::QueuedConnection); } } diff --git a/src/core/tagreaderclient.cpp b/src/core/tagreaderclient.cpp index 9d5f507c..2ea93225 100644 --- a/src/core/tagreaderclient.cpp +++ b/src/core/tagreaderclient.cpp @@ -54,7 +54,7 @@ TagReaderClient::TagReaderClient(QObject *parent) : QObject(parent), worker_pool void TagReaderClient::Start() { worker_pool_->Start(); } void TagReaderClient::ExitAsync() { - QMetaObject::invokeMethod(this, "Exit", Qt::QueuedConnection); + QMetaObject::invokeMethod(this, &TagReaderClient::Exit, Qt::QueuedConnection); } void TagReaderClient::Exit() { diff --git a/src/covermanager/albumcoverloader.cpp b/src/covermanager/albumcoverloader.cpp index fbf5f506..154e9ae9 100644 --- a/src/covermanager/albumcoverloader.cpp +++ b/src/covermanager/albumcoverloader.cpp @@ -68,7 +68,7 @@ AlbumCoverLoader::AlbumCoverLoader(QObject *parent) void AlbumCoverLoader::ExitAsync() { stop_requested_ = true; - QMetaObject::invokeMethod(this, "Exit", Qt::QueuedConnection); + QMetaObject::invokeMethod(this, &AlbumCoverLoader::Exit, Qt::QueuedConnection); } @@ -166,7 +166,7 @@ quint64 AlbumCoverLoader::EnqueueTask(TaskPtr task) { tasks_.enqueue(task); } - QMetaObject::invokeMethod(this, "ProcessTasks", Qt::QueuedConnection); + QMetaObject::invokeMethod(this, &AlbumCoverLoader::ProcessTasks, Qt::QueuedConnection); return task->id; diff --git a/src/device/devicedatabasebackend.cpp b/src/device/devicedatabasebackend.cpp index d74feb93..5b8ae9fe 100644 --- a/src/device/devicedatabasebackend.cpp +++ b/src/device/devicedatabasebackend.cpp @@ -58,7 +58,7 @@ void DeviceDatabaseBackend::Close() { } void DeviceDatabaseBackend::ExitAsync() { - QMetaObject::invokeMethod(this, "Exit", Qt::QueuedConnection); + QMetaObject::invokeMethod(this, &DeviceDatabaseBackend::Exit, Qt::QueuedConnection); } void DeviceDatabaseBackend::Exit() { diff --git a/src/device/devicelister.cpp b/src/device/devicelister.cpp index 8f22fc2e..093a0272 100644 --- a/src/device/devicelister.cpp +++ b/src/device/devicelister.cpp @@ -87,7 +87,7 @@ void DeviceLister::MountDevice(const QString &id, const int request_id) { } void DeviceLister::ExitAsync() { - QMetaObject::invokeMethod(this, "Exit", Qt::QueuedConnection); + QMetaObject::invokeMethod(this, &DeviceLister::Exit, Qt::QueuedConnection); } void DeviceLister::Exit() { diff --git a/src/device/filesystemdevice.cpp b/src/device/filesystemdevice.cpp index 66738d5c..9a685b86 100644 --- a/src/device/filesystemdevice.cpp +++ b/src/device/filesystemdevice.cpp @@ -85,7 +85,7 @@ bool FilesystemDevice::Init() { } void FilesystemDevice::CloseAsync() { - QMetaObject::invokeMethod(this, "Close", Qt::QueuedConnection); + QMetaObject::invokeMethod(this, &FilesystemDevice::Close, Qt::QueuedConnection); } void FilesystemDevice::Close() { diff --git a/src/moodbar/moodbarloader.cpp b/src/moodbar/moodbarloader.cpp index e4dcfc74..f0400daa 100644 --- a/src/moodbar/moodbarloader.cpp +++ b/src/moodbar/moodbarloader.cpp @@ -160,7 +160,7 @@ void MoodbarLoader::MaybeTakeNextRequest() { active_requests_ << url; qLog(Info) << "Creating moodbar data for" << url.toLocalFile(); - QMetaObject::invokeMethod(requests_[url], "Start", Qt::QueuedConnection); + QMetaObject::invokeMethod(requests_[url], &MoodbarPipeline::Start, Qt::QueuedConnection); } diff --git a/src/playlist/playlist.cpp b/src/playlist/playlist.cpp index 3967545a..fc90953a 100644 --- a/src/playlist/playlist.cpp +++ b/src/playlist/playlist.cpp @@ -1490,7 +1490,7 @@ void Playlist::ScheduleSaveAsync() { ScheduleSave(); } else { - QMetaObject::invokeMethod(this, "ScheduleSave", Qt::QueuedConnection); + QMetaObject::invokeMethod(this, &Playlist::ScheduleSave, Qt::QueuedConnection); } } diff --git a/src/playlist/playlistbackend.cpp b/src/playlist/playlistbackend.cpp index c1a3f5c5..f5f5ad7b 100644 --- a/src/playlist/playlistbackend.cpp +++ b/src/playlist/playlistbackend.cpp @@ -73,7 +73,7 @@ void PlaylistBackend::Close() { } void PlaylistBackend::ExitAsync() { - QMetaObject::invokeMethod(this, "Exit", Qt::QueuedConnection); + QMetaObject::invokeMethod(this, &PlaylistBackend::Exit, Qt::QueuedConnection); } void PlaylistBackend::Exit() { diff --git a/src/radios/radiobackend.cpp b/src/radios/radiobackend.cpp index 55497c52..542f7e05 100644 --- a/src/radios/radiobackend.cpp +++ b/src/radios/radiobackend.cpp @@ -44,7 +44,7 @@ void RadioBackend::Close() { } void RadioBackend::ExitAsync() { - QMetaObject::invokeMethod(this, "Exit", Qt::QueuedConnection); + QMetaObject::invokeMethod(this, &RadioBackend::Exit, Qt::QueuedConnection); } void RadioBackend::Exit() { @@ -85,7 +85,7 @@ void RadioBackend::AddChannels(const RadioChannelList &channels) { void RadioBackend::GetChannelsAsync() { - QMetaObject::invokeMethod(this, "GetChannels", Qt::QueuedConnection); + QMetaObject::invokeMethod(this, &RadioBackend::GetChannels, Qt::QueuedConnection); } @@ -117,7 +117,7 @@ void RadioBackend::GetChannels() { } void RadioBackend::DeleteChannelsAsync() { - QMetaObject::invokeMethod(this, "DeleteChannels", Qt::QueuedConnection); + QMetaObject::invokeMethod(this, &RadioBackend::DeleteChannels, Qt::QueuedConnection); } void RadioBackend::DeleteChannels() {