Use override
This commit is contained in:
@@ -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<Song::FileType> *supported_types);
|
||||
bool CopyToStorage(const CopyJob &job);
|
||||
void FinishCopy(const bool success);
|
||||
bool StartCopy(QList<Song::FileType> *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);
|
||||
|
||||
@@ -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_;
|
||||
|
||||
@@ -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<Song::FileType> *ret);
|
||||
bool GetSupportedFiletypes(QList<Song::FileType> *ret) override;
|
||||
|
||||
bool StartCopy(QList<Song::FileType> *supported_types);
|
||||
bool CopyToStorage(const CopyJob &job);
|
||||
void FinishCopy(bool success);
|
||||
bool StartCopy(QList<Song::FileType> *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);
|
||||
|
||||
@@ -41,7 +41,7 @@ class GPodLoader : public QObject {
|
||||
|
||||
public:
|
||||
explicit GPodLoader(const QString &mount_point, TaskManager *task_manager, CollectionBackend *backend, std::shared_ptr<ConnectedDevice> device);
|
||||
~GPodLoader();
|
||||
~GPodLoader() override;
|
||||
|
||||
void set_music_path_prefix(const QString &prefix) { path_prefix_ = prefix; }
|
||||
void set_song_type(Song::FileType type) { type_ = type; }
|
||||
|
||||
@@ -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<QUrl> 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<QUrl> 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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user