From 55f610f3b29daf9d07b4946df01493a2d8008dd0 Mon Sep 17 00:00:00 2001 From: Jonas Kvinge Date: Wed, 20 Feb 2019 21:29:14 +0100 Subject: [PATCH] Fix formatting --- ext/libstrawberry-common/core/messagehandler.h | 4 +--- ext/libstrawberry-common/core/messagereply.h | 7 +++---- src/playlist/playlist.cpp | 4 ++-- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/ext/libstrawberry-common/core/messagehandler.h b/ext/libstrawberry-common/core/messagehandler.h index 65a1d8fa..aa900973 100644 --- a/ext/libstrawberry-common/core/messagehandler.h +++ b/ext/libstrawberry-common/core/messagehandler.h @@ -43,8 +43,7 @@ class _MessageHandlerBase : public QObject { Q_OBJECT public: - // device can be NULL, in which case you must call SetDevice before writing - // any messages. + // device can be nullptr, in which case you must call SetDevice before writing any messages. _MessageHandlerBase(QIODevice *device, QObject *parent); void SetDevice(QIODevice *device); @@ -176,4 +175,3 @@ void AbstractMessageHandler::AbortAll() { } #endif // MESSAGEHANDLER_H - diff --git a/ext/libstrawberry-common/core/messagereply.h b/ext/libstrawberry-common/core/messagereply.h index 5e2e04ee..5e9bf8c6 100644 --- a/ext/libstrawberry-common/core/messagereply.h +++ b/ext/libstrawberry-common/core/messagereply.h @@ -43,18 +43,17 @@ class _MessageReplyBase : public QObject { void Abort(); -signals: + signals: void Finished(bool success); -protected: + protected: bool finished_; bool success_; QSemaphore semaphore_; }; -// A reply future class that is returned immediately for requests that will -// occur in the background. Similar to QNetworkReply. +// A reply future class that is returned immediately for requests that will occur in the background. Similar to QNetworkReply. template class MessageReply : public _MessageReplyBase { public: diff --git a/src/playlist/playlist.cpp b/src/playlist/playlist.cpp index 7fdfc57e..44eee24f 100644 --- a/src/playlist/playlist.cpp +++ b/src/playlist/playlist.cpp @@ -376,8 +376,8 @@ bool Playlist::setData(const QModelIndex &index, const QVariant &value, int role if (!set_column_value(song, (Column)index.column(), value)) return false; - TagReaderReply *reply = TagReaderClient::Instance()->SaveFile( song.url().toLocalFile(), song); - NewClosure(reply, SIGNAL(Finished(bool)), this, SLOT(SongSaveComplete(TagReaderReply*, QPersistentModelIndex)), reply, QPersistentModelIndex(index)); + TagReaderReply *reply = TagReaderClient::Instance()->SaveFile(song.url().toLocalFile(), song); + NewClosure(reply, SIGNAL(Finished(bool)), this, SLOT(SongSaveComplete(TagReaderReply*, QPersistentModelIndex)), reply, QPersistentModelIndex(index)); return true;