diff --git a/3rdparty/singleapplication/singleapplication.h b/3rdparty/singleapplication/singleapplication.h index 69d250ef..f1b77e8e 100644 --- a/3rdparty/singleapplication/singleapplication.h +++ b/3rdparty/singleapplication/singleapplication.h @@ -92,7 +92,7 @@ public: * @see See the corresponding QAPPLICATION_CLASS constructor for reference */ explicit SingleApplication( int &argc, char *argv[], bool allowSecondary = false, Options options = Mode::User, int timeout = 1000 ); - ~SingleApplication(); + ~SingleApplication() override; /** * @brief Returns if the instance is the primary instance diff --git a/3rdparty/singleapplication/singleapplication_p.h b/3rdparty/singleapplication/singleapplication_p.h index d4b128c4..70e3fef2 100644 --- a/3rdparty/singleapplication/singleapplication_p.h +++ b/3rdparty/singleapplication/singleapplication_p.h @@ -75,7 +75,7 @@ class SingleApplicationPrivate : public QObject { Q_DECLARE_PUBLIC(SingleApplication) explicit SingleApplicationPrivate(SingleApplication *_q_ptr); - ~SingleApplicationPrivate(); + ~SingleApplicationPrivate() override; void genBlockServerName(); void initializeMemoryBlock(); diff --git a/3rdparty/singleapplication/singlecoreapplication.h b/3rdparty/singleapplication/singlecoreapplication.h index 45877ca6..2b27c199 100644 --- a/3rdparty/singleapplication/singlecoreapplication.h +++ b/3rdparty/singleapplication/singlecoreapplication.h @@ -92,7 +92,7 @@ public: * @see See the corresponding QAPPLICATION_CLASS constructor for reference */ explicit SingleCoreApplication( int &argc, char *argv[], bool allowSecondary = false, Options options = Mode::User, int timeout = 1000 ); - ~SingleCoreApplication(); + ~SingleCoreApplication() override; /** * @brief Returns if the instance is the primary instance diff --git a/3rdparty/singleapplication/singlecoreapplication_p.h b/3rdparty/singleapplication/singlecoreapplication_p.h index 869ade74..bf313eaa 100644 --- a/3rdparty/singleapplication/singlecoreapplication_p.h +++ b/3rdparty/singleapplication/singlecoreapplication_p.h @@ -75,7 +75,7 @@ class SingleCoreApplicationPrivate : public QObject { Q_DECLARE_PUBLIC(SingleCoreApplication) explicit SingleCoreApplicationPrivate(SingleCoreApplication *_q_ptr); - ~SingleCoreApplicationPrivate(); + ~SingleCoreApplicationPrivate() override; void genBlockServerName(); void initializeMemoryBlock(); diff --git a/ext/libstrawberry-common/core/closure.h b/ext/libstrawberry-common/core/closure.h index 9cbcfe35..b915b6ce 100644 --- a/ext/libstrawberry-common/core/closure.h +++ b/ext/libstrawberry-common/core/closure.h @@ -65,7 +65,7 @@ class ObjectHelper : public QObject { Q_OBJECT public: ObjectHelper(QObject *sender, const char *signal, ClosureBase *closure); - ~ObjectHelper(); + ~ObjectHelper() override; private slots: void Invoked(); @@ -113,7 +113,7 @@ class Closure : public ClosureBase { QObject::connect(receiver_, SIGNAL(destroyed()), helper_, SLOT(deleteLater())); } - virtual void Invoke() { + void Invoke() override { function_(); } @@ -167,7 +167,7 @@ class CallbackClosure : public ClosureBase { public: CallbackClosure(QObject *sender, const char *signal, std::function callback); - virtual void Invoke(); + void Invoke() override; private: std::function callback_; diff --git a/ext/libstrawberry-common/core/concurrentrun.h b/ext/libstrawberry-common/core/concurrentrun.h index 6c51a39c..933f54c8 100644 --- a/ext/libstrawberry-common/core/concurrentrun.h +++ b/ext/libstrawberry-common/core/concurrentrun.h @@ -59,7 +59,7 @@ class ThreadFunctorBase : public QFutureInterface, public QRunnable return future; } - virtual void run() = 0; + void run() override = 0; }; template @@ -69,7 +69,7 @@ class ThreadFunctor : public ThreadFunctorBase { : function_(std::bind(function, args...)) { } - virtual void run() { + void run() override { this->reportResult(function_()); this->reportFinished(); } @@ -86,7 +86,7 @@ class ThreadFunctor : public ThreadFunctorBase { : function_(std::bind(function, args...)) { } - virtual void run() { + void run() override { function_(); this->reportFinished(); } diff --git a/ext/libstrawberry-common/core/logging.h b/ext/libstrawberry-common/core/logging.h index 873f0e83..71b18995 100644 --- a/ext/libstrawberry-common/core/logging.h +++ b/ext/libstrawberry-common/core/logging.h @@ -41,8 +41,8 @@ namespace logging { class NullDevice : public QIODevice { protected: - qint64 readData(char*, qint64) { return -1; } - qint64 writeData(const char*, qint64 len) { return len; } + qint64 readData(char*, qint64) override { return -1; } + qint64 writeData(const char*, qint64 len) override { return len; } }; enum Level { diff --git a/ext/libstrawberry-common/core/messagehandler.h b/ext/libstrawberry-common/core/messagehandler.h index dbf78efd..67df9a71 100644 --- a/ext/libstrawberry-common/core/messagehandler.h +++ b/ext/libstrawberry-common/core/messagehandler.h @@ -82,7 +82,7 @@ template class AbstractMessageHandler : public _MessageHandlerBase { public: AbstractMessageHandler(QIODevice *device, QObject *parent); - ~AbstractMessageHandler() { AbortAll(); } + ~AbstractMessageHandler() override { AbortAll(); } typedef MT MessageType; typedef MessageReply ReplyType; @@ -107,8 +107,8 @@ protected: virtual void MessageArrived(const MessageType &message) { Q_UNUSED(message); } // _MessageHandlerBase - bool RawMessageArrived(const QByteArray &data); - void AbortAll(); + bool RawMessageArrived(const QByteArray &data) override; + void AbortAll() override; private: QMap pending_replies_; diff --git a/ext/libstrawberry-common/core/messagereply.h b/ext/libstrawberry-common/core/messagereply.h index 30ec2149..5eb71a50 100644 --- a/ext/libstrawberry-common/core/messagereply.h +++ b/ext/libstrawberry-common/core/messagereply.h @@ -59,7 +59,7 @@ class MessageReply : public _MessageReplyBase { public: explicit MessageReply(const MessageType& request_message, QObject *parent = nullptr); - int id() const { return request_message_.id(); } + int id() const override { return request_message_.id(); } const MessageType& request_message() const { return request_message_; } const MessageType& message() const { return reply_message_; } diff --git a/ext/libstrawberry-common/core/workerpool.h b/ext/libstrawberry-common/core/workerpool.h index 70ca08b2..b41a808c 100644 --- a/ext/libstrawberry-common/core/workerpool.h +++ b/ext/libstrawberry-common/core/workerpool.h @@ -68,7 +68,7 @@ template class WorkerPool : public _WorkerPoolBase { public: explicit WorkerPool(QObject *parent = nullptr); - ~WorkerPool(); + ~WorkerPool() override; typedef typename HandlerType::MessageType MessageType; typedef typename HandlerType::ReplyType ReplyType; @@ -95,10 +95,10 @@ class WorkerPool : public _WorkerPoolBase { protected: // These are all reimplemented slots, they are called on the WorkerPool's thread. - void DoStart(); - void NewConnection(); - void ProcessError(QProcess::ProcessError error); - void SendQueuedMessages(); + void DoStart() override; + void NewConnection() override; + void ProcessError(QProcess::ProcessError error) override; + void SendQueuedMessages() override; private: struct Worker { diff --git a/ext/strawberry-tagreader/tagreaderworker.h b/ext/strawberry-tagreader/tagreaderworker.h index 074fddeb..e7063aa5 100644 --- a/ext/strawberry-tagreader/tagreaderworker.h +++ b/ext/strawberry-tagreader/tagreaderworker.h @@ -33,8 +33,8 @@ public: explicit TagReaderWorker(QIODevice *socket, QObject *parent = nullptr); protected: - void MessageArrived(const pb::tagreader::Message &message); - void DeviceClosed(); + void MessageArrived(const pb::tagreader::Message &message) override; + void DeviceClosed() override; private: TagReader tag_reader_; diff --git a/src/device/afcdevice.h b/src/device/afcdevice.h index 09133675..6036ac07 100644 --- a/src/device/afcdevice.h +++ b/src/device/afcdevice.h @@ -44,20 +44,20 @@ class AfcDevice : public GPodDevice { public: Q_INVOKABLE AfcDevice(const QUrl &url, DeviceLister *lister, const QString &unique_id, DeviceManager *manager, Application *app, const int database_id, const bool first_time); - ~AfcDevice(); + ~AfcDevice() override; - bool Init(); + bool Init() override; static QStringList url_schemes() { return QStringList() << "afc"; } - bool StartCopy(QList *supported_types); - bool CopyToStorage(const CopyJob &job); - void FinishCopy(const bool success); + bool StartCopy(QList *supported_types) override; + bool CopyToStorage(const CopyJob &job) override; + void FinishCopy(const bool success) override; - bool DeleteFromStorage(const DeleteJob &job); + bool DeleteFromStorage(const DeleteJob &job) override; protected: - void FinaliseDatabase(); + void FinaliseDatabase() override; private slots: void CopyFinished(bool success); diff --git a/src/device/afcfile.h b/src/device/afcfile.h index c7900b6a..e7dd57da 100644 --- a/src/device/afcfile.h +++ b/src/device/afcfile.h @@ -18,18 +18,18 @@ class AfcFile : public QIODevice { public: explicit AfcFile(iMobileDeviceConnection* connection, const QString &path, QObject *parent = nullptr); - ~AfcFile(); + ~AfcFile() override; // QIODevice - void close(); - bool open(OpenMode mode); - bool seek(qint64 pos); - qint64 size() const; + void close() override; + bool open(OpenMode mode) override; + bool seek(qint64 pos) override; + qint64 size() const override; private: // QIODevice - qint64 readData(char *data, qint64 max_size); - qint64 writeData(const char *data, qint64 max_size); + qint64 readData(char *data, qint64 max_size) override; + qint64 writeData(const char *data, qint64 max_size) override; iMobileDeviceConnection *connection_; uint64_t handle_; diff --git a/src/device/gpoddevice.h b/src/device/gpoddevice.h index f12a24f6..2c892fd9 100644 --- a/src/device/gpoddevice.h +++ b/src/device/gpoddevice.h @@ -48,25 +48,25 @@ class GPodDevice : public ConnectedDevice, public virtual MusicStorage { public: Q_INVOKABLE GPodDevice(const QUrl &url, DeviceLister *lister, const QString &unique_id, DeviceManager *manager, Application *app, const int database_id, const bool first_time); - ~GPodDevice(); + ~GPodDevice() override; - bool Init(); - void ConnectAsync(); - void Close(); - bool IsLoading() { return loader_; } + bool Init() override; + void ConnectAsync() override; + void Close() override; + bool IsLoading() override { return loader_; } QObject *Loader() { return loader_; } static QStringList url_schemes() { return QStringList() << "ipod"; } - bool GetSupportedFiletypes(QList *ret); + bool GetSupportedFiletypes(QList *ret) override; - bool StartCopy(QList *supported_types); - bool CopyToStorage(const CopyJob &job); - void FinishCopy(bool success); + bool StartCopy(QList *supported_types) override; + bool CopyToStorage(const CopyJob &job) override; + void FinishCopy(bool success) override; - void StartDelete(); - bool DeleteFromStorage(const DeleteJob &job); - void FinishDelete(bool success); + void StartDelete() override; + bool DeleteFromStorage(const DeleteJob &job) override; + void FinishDelete(bool success) override; protected slots: void LoadFinished(Itdb_iTunesDB *db, bool success); diff --git a/src/device/gpodloader.h b/src/device/gpodloader.h index 31b0a984..c688f60d 100644 --- a/src/device/gpodloader.h +++ b/src/device/gpodloader.h @@ -41,7 +41,7 @@ class GPodLoader : public QObject { public: explicit GPodLoader(const QString &mount_point, TaskManager *task_manager, CollectionBackend *backend, std::shared_ptr device); - ~GPodLoader(); + ~GPodLoader() override; void set_music_path_prefix(const QString &prefix) { path_prefix_ = prefix; } void set_song_type(Song::FileType type) { type_ = type; } diff --git a/src/device/ilister.h b/src/device/ilister.h index de50269b..78c6bd10 100644 --- a/src/device/ilister.h +++ b/src/device/ilister.h @@ -40,22 +40,22 @@ class iLister : public DeviceLister { public: explicit iLister(); - ~iLister(); + ~iLister() override; - int priority() const { return 120; } + int priority() const override { return 120; } - virtual QStringList DeviceUniqueIDs(); - virtual QVariantList DeviceIcons(const QString &id); - virtual QString DeviceManufacturer(const QString &id); - virtual QString DeviceModel(const QString &id); - virtual quint64 DeviceCapacity(const QString &id); - virtual quint64 DeviceFreeSpace(const QString &id); - virtual QVariantMap DeviceHardwareInfo(const QString &id); - virtual QString MakeFriendlyName(const QString &id); - virtual QList MakeDeviceUrls(const QString &id); + QStringList DeviceUniqueIDs() override; + QVariantList DeviceIcons(const QString &id) override; + QString DeviceManufacturer(const QString &id) override; + QString DeviceModel(const QString &id) override; + quint64 DeviceCapacity(const QString &id) override; + quint64 DeviceFreeSpace(const QString &id) override; + QVariantMap DeviceHardwareInfo(const QString &id) override; + QString MakeFriendlyName(const QString &id) override; + QList MakeDeviceUrls(const QString &id) override; public slots: - virtual void UpdateDeviceFreeSpace(const QString &id); + void UpdateDeviceFreeSpace(const QString &id) override; private: struct DeviceInfo { @@ -80,7 +80,7 @@ class iLister : public DeviceLister { QString bt_mac; }; - virtual bool Init(); + bool Init() override; static void EventCallback(const idevice_event_t *event, void *context); diff --git a/src/engine/pulsedevicefinder.h b/src/engine/pulsedevicefinder.h index 5602269a..286a7d49 100644 --- a/src/engine/pulsedevicefinder.h +++ b/src/engine/pulsedevicefinder.h @@ -34,10 +34,10 @@ class PulseDeviceFinder : public DeviceFinder { public: explicit PulseDeviceFinder(); - ~PulseDeviceFinder(); + ~PulseDeviceFinder() override; - virtual bool Initialise(); - virtual QList ListDevices(); + bool Initialise() override; + QList ListDevices() override; private: struct ListDevicesState {