Use new connect syntax for QMetaObject::invokeMethod
This commit is contained in:
parent
301e6b194a
commit
e511b2faf9
@ -228,7 +228,7 @@ void WorkerPool<HandlerType>::SetExecutableName(const QString &executable_name)
|
|||||||
|
|
||||||
template<typename HandlerType>
|
template<typename HandlerType>
|
||||||
void WorkerPool<HandlerType>::Start() {
|
void WorkerPool<HandlerType>::Start() {
|
||||||
QMetaObject::invokeMethod(this, "DoStart");
|
QMetaObject::invokeMethod(this, &WorkerPool<HandlerType>::DoStart);
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename HandlerType>
|
template<typename HandlerType>
|
||||||
@ -423,7 +423,7 @@ WorkerPool<HandlerType>::SendMessageWithReply(MessageType *message) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Wake up the main thread
|
// Wake up the main thread
|
||||||
QMetaObject::invokeMethod(this, "SendQueuedMessages", Qt::QueuedConnection);
|
QMetaObject::invokeMethod(this, &WorkerPool<HandlerType>::SendQueuedMessages, Qt::QueuedConnection);
|
||||||
|
|
||||||
return reply;
|
return reply;
|
||||||
|
|
||||||
|
@ -89,7 +89,7 @@ void CollectionBackend::Close() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void CollectionBackend::ExitAsync() {
|
void CollectionBackend::ExitAsync() {
|
||||||
QMetaObject::invokeMethod(this, "Exit", Qt::QueuedConnection);
|
QMetaObject::invokeMethod(this, &CollectionBackend::Exit, Qt::QueuedConnection);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CollectionBackend::Exit() {
|
void CollectionBackend::Exit() {
|
||||||
@ -115,19 +115,19 @@ void CollectionBackend::ReportErrors(const CollectionQuery &query) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void CollectionBackend::LoadDirectoriesAsync() {
|
void CollectionBackend::LoadDirectoriesAsync() {
|
||||||
QMetaObject::invokeMethod(this, "LoadDirectories", Qt::QueuedConnection);
|
QMetaObject::invokeMethod(this, &CollectionBackend::LoadDirectories, Qt::QueuedConnection);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CollectionBackend::UpdateTotalSongCountAsync() {
|
void CollectionBackend::UpdateTotalSongCountAsync() {
|
||||||
QMetaObject::invokeMethod(this, "UpdateTotalSongCount", Qt::QueuedConnection);
|
QMetaObject::invokeMethod(this, &CollectionBackend::UpdateTotalSongCount, Qt::QueuedConnection);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CollectionBackend::UpdateTotalArtistCountAsync() {
|
void CollectionBackend::UpdateTotalArtistCountAsync() {
|
||||||
QMetaObject::invokeMethod(this, "UpdateTotalArtistCount", Qt::QueuedConnection);
|
QMetaObject::invokeMethod(this, &CollectionBackend::UpdateTotalArtistCount, Qt::QueuedConnection);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CollectionBackend::UpdateTotalAlbumCountAsync() {
|
void CollectionBackend::UpdateTotalAlbumCountAsync() {
|
||||||
QMetaObject::invokeMethod(this, "UpdateTotalAlbumCount", Qt::QueuedConnection);
|
QMetaObject::invokeMethod(this, &CollectionBackend::UpdateTotalAlbumCount, Qt::QueuedConnection);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CollectionBackend::IncrementPlayCountAsync(const int id) {
|
void CollectionBackend::IncrementPlayCountAsync(const int id) {
|
||||||
@ -1825,7 +1825,7 @@ bool CollectionBackend::ResetPlayStatistics(const QStringList &id_str_list) {
|
|||||||
|
|
||||||
void CollectionBackend::DeleteAllAsync() {
|
void CollectionBackend::DeleteAllAsync() {
|
||||||
|
|
||||||
QMetaObject::invokeMethod(this, "DeleteAll", Qt::QueuedConnection);
|
QMetaObject::invokeMethod(this, &CollectionBackend::DeleteAll, Qt::QueuedConnection);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -115,7 +115,7 @@ CollectionWatcher::CollectionWatcher(Song::Source source, QObject *parent)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void CollectionWatcher::ExitAsync() {
|
void CollectionWatcher::ExitAsync() {
|
||||||
QMetaObject::invokeMethod(this, "Exit", Qt::QueuedConnection);
|
QMetaObject::invokeMethod(this, &CollectionWatcher::Exit, Qt::QueuedConnection);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CollectionWatcher::Exit() {
|
void CollectionWatcher::Exit() {
|
||||||
@ -131,7 +131,7 @@ void CollectionWatcher::Exit() {
|
|||||||
|
|
||||||
void CollectionWatcher::ReloadSettingsAsync() {
|
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() {
|
void CollectionWatcher::IncrementalScanAsync() {
|
||||||
|
|
||||||
QMetaObject::invokeMethod(this, "IncrementalScanNow", Qt::QueuedConnection);
|
QMetaObject::invokeMethod(this, &CollectionWatcher::IncrementalScanNow, Qt::QueuedConnection);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CollectionWatcher::FullScanAsync() {
|
void CollectionWatcher::FullScanAsync() {
|
||||||
|
|
||||||
QMetaObject::invokeMethod(this, "FullScanNow", Qt::QueuedConnection);
|
QMetaObject::invokeMethod(this, &CollectionWatcher::FullScanNow, Qt::QueuedConnection);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -91,7 +91,7 @@ Database::~Database() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Database::ExitAsync() {
|
void Database::ExitAsync() {
|
||||||
QMetaObject::invokeMethod(this, "Exit", Qt::QueuedConnection);
|
QMetaObject::invokeMethod(this, &Database::Exit, Qt::QueuedConnection);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Database::Exit() {
|
void Database::Exit() {
|
||||||
|
@ -735,7 +735,7 @@ void SongLoader::StopTypefindAsync(const bool success) {
|
|||||||
state_ = State::Finished;
|
state_ = State::Finished;
|
||||||
success_ = success;
|
success_ = success;
|
||||||
|
|
||||||
QMetaObject::invokeMethod(this, "StopTypefind", Qt::QueuedConnection);
|
QMetaObject::invokeMethod(this, &SongLoader::StopTypefind, Qt::QueuedConnection);
|
||||||
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@ -746,7 +746,7 @@ void SongLoader::ScheduleTimeoutAsync() {
|
|||||||
ScheduleTimeout();
|
ScheduleTimeout();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
QMetaObject::invokeMethod(this, "ScheduleTimeout", Qt::QueuedConnection);
|
QMetaObject::invokeMethod(this, &SongLoader::ScheduleTimeout, Qt::QueuedConnection);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -54,7 +54,7 @@ TagReaderClient::TagReaderClient(QObject *parent) : QObject(parent), worker_pool
|
|||||||
void TagReaderClient::Start() { worker_pool_->Start(); }
|
void TagReaderClient::Start() { worker_pool_->Start(); }
|
||||||
|
|
||||||
void TagReaderClient::ExitAsync() {
|
void TagReaderClient::ExitAsync() {
|
||||||
QMetaObject::invokeMethod(this, "Exit", Qt::QueuedConnection);
|
QMetaObject::invokeMethod(this, &TagReaderClient::Exit, Qt::QueuedConnection);
|
||||||
}
|
}
|
||||||
|
|
||||||
void TagReaderClient::Exit() {
|
void TagReaderClient::Exit() {
|
||||||
|
@ -68,7 +68,7 @@ AlbumCoverLoader::AlbumCoverLoader(QObject *parent)
|
|||||||
void AlbumCoverLoader::ExitAsync() {
|
void AlbumCoverLoader::ExitAsync() {
|
||||||
|
|
||||||
stop_requested_ = true;
|
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);
|
tasks_.enqueue(task);
|
||||||
}
|
}
|
||||||
|
|
||||||
QMetaObject::invokeMethod(this, "ProcessTasks", Qt::QueuedConnection);
|
QMetaObject::invokeMethod(this, &AlbumCoverLoader::ProcessTasks, Qt::QueuedConnection);
|
||||||
|
|
||||||
return task->id;
|
return task->id;
|
||||||
|
|
||||||
|
@ -58,7 +58,7 @@ void DeviceDatabaseBackend::Close() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void DeviceDatabaseBackend::ExitAsync() {
|
void DeviceDatabaseBackend::ExitAsync() {
|
||||||
QMetaObject::invokeMethod(this, "Exit", Qt::QueuedConnection);
|
QMetaObject::invokeMethod(this, &DeviceDatabaseBackend::Exit, Qt::QueuedConnection);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DeviceDatabaseBackend::Exit() {
|
void DeviceDatabaseBackend::Exit() {
|
||||||
|
@ -87,7 +87,7 @@ void DeviceLister::MountDevice(const QString &id, const int request_id) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void DeviceLister::ExitAsync() {
|
void DeviceLister::ExitAsync() {
|
||||||
QMetaObject::invokeMethod(this, "Exit", Qt::QueuedConnection);
|
QMetaObject::invokeMethod(this, &DeviceLister::Exit, Qt::QueuedConnection);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DeviceLister::Exit() {
|
void DeviceLister::Exit() {
|
||||||
|
@ -85,7 +85,7 @@ bool FilesystemDevice::Init() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void FilesystemDevice::CloseAsync() {
|
void FilesystemDevice::CloseAsync() {
|
||||||
QMetaObject::invokeMethod(this, "Close", Qt::QueuedConnection);
|
QMetaObject::invokeMethod(this, &FilesystemDevice::Close, Qt::QueuedConnection);
|
||||||
}
|
}
|
||||||
|
|
||||||
void FilesystemDevice::Close() {
|
void FilesystemDevice::Close() {
|
||||||
|
@ -160,7 +160,7 @@ void MoodbarLoader::MaybeTakeNextRequest() {
|
|||||||
active_requests_ << url;
|
active_requests_ << url;
|
||||||
|
|
||||||
qLog(Info) << "Creating moodbar data for" << url.toLocalFile();
|
qLog(Info) << "Creating moodbar data for" << url.toLocalFile();
|
||||||
QMetaObject::invokeMethod(requests_[url], "Start", Qt::QueuedConnection);
|
QMetaObject::invokeMethod(requests_[url], &MoodbarPipeline::Start, Qt::QueuedConnection);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1490,7 +1490,7 @@ void Playlist::ScheduleSaveAsync() {
|
|||||||
ScheduleSave();
|
ScheduleSave();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
QMetaObject::invokeMethod(this, "ScheduleSave", Qt::QueuedConnection);
|
QMetaObject::invokeMethod(this, &Playlist::ScheduleSave, Qt::QueuedConnection);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -73,7 +73,7 @@ void PlaylistBackend::Close() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void PlaylistBackend::ExitAsync() {
|
void PlaylistBackend::ExitAsync() {
|
||||||
QMetaObject::invokeMethod(this, "Exit", Qt::QueuedConnection);
|
QMetaObject::invokeMethod(this, &PlaylistBackend::Exit, Qt::QueuedConnection);
|
||||||
}
|
}
|
||||||
|
|
||||||
void PlaylistBackend::Exit() {
|
void PlaylistBackend::Exit() {
|
||||||
|
@ -44,7 +44,7 @@ void RadioBackend::Close() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void RadioBackend::ExitAsync() {
|
void RadioBackend::ExitAsync() {
|
||||||
QMetaObject::invokeMethod(this, "Exit", Qt::QueuedConnection);
|
QMetaObject::invokeMethod(this, &RadioBackend::Exit, Qt::QueuedConnection);
|
||||||
}
|
}
|
||||||
|
|
||||||
void RadioBackend::Exit() {
|
void RadioBackend::Exit() {
|
||||||
@ -85,7 +85,7 @@ void RadioBackend::AddChannels(const RadioChannelList &channels) {
|
|||||||
|
|
||||||
void RadioBackend::GetChannelsAsync() {
|
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() {
|
void RadioBackend::DeleteChannelsAsync() {
|
||||||
QMetaObject::invokeMethod(this, "DeleteChannels", Qt::QueuedConnection);
|
QMetaObject::invokeMethod(this, &RadioBackend::DeleteChannels, Qt::QueuedConnection);
|
||||||
}
|
}
|
||||||
|
|
||||||
void RadioBackend::DeleteChannels() {
|
void RadioBackend::DeleteChannels() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user