Use consistently override (or final where Q_DECL_FINAL was used)

parent 2f79730e
......@@ -39,7 +39,7 @@ class CardPort : public Port
Q_PROPERTY(QVariantMap properties READ properties NOTIFY propertiesChanged)
public:
CardPort(QObject *parent = nullptr) : Port(parent) {}
virtual ~CardPort() {}
~CardPort() override {}
// int direction; /**< A #pa_direction enum, indicating the direction of this port. */
// uint32_t n_profiles; /**< Number of entries in profile array */
......
......@@ -36,7 +36,7 @@ class Client : public PulseObject
Q_PROPERTY(QString name READ name NOTIFY nameChanged)
public:
Client(QObject *parent);
virtual ~Client();
~Client() override;
void update(const pa_client_info *info);
......
......@@ -43,7 +43,7 @@ class Context : public QObject
Q_OBJECT
public:
Context(QObject *parent = nullptr);
~Context();
~Context() override;
static Context *instance();
......
......@@ -53,7 +53,7 @@ public:
};
Q_ENUMS(State);
virtual ~Device() {}
~Device() override {}
template <typename PAInfo>
void updateDevice(const PAInfo *info)
......
......@@ -84,7 +84,7 @@ class GConfItem : public QObject
/*! Finalizes a GConfItem.
*/
virtual ~GConfItem();
~GConfItem() override;
/*! Returns the root of this item, as given to the constructor.
*/
......
......@@ -35,12 +35,12 @@ class KCMPulseAudio : public KQuickAddons::ConfigModule
Q_OBJECT
public:
KCMPulseAudio(QObject *parent, const QVariantList &args);
~KCMPulseAudio();
~KCMPulseAudio() override;
public slots:
void defaults() Q_DECL_OVERRIDE Q_DECL_FINAL;
void load() Q_DECL_OVERRIDE Q_DECL_FINAL;
void save() Q_DECL_OVERRIDE Q_DECL_FINAL;
void defaults() final;
void load() final;
void save() final;
private:
Context *m_context;
......
......@@ -72,16 +72,16 @@ template<typename Type, typename PAInfo>
class MapBase : public MapBaseQObject
{
public:
virtual ~MapBase() {}
~MapBase() override {}
const QMap<quint32, Type *> &data() const { return m_data; }
int count() const Q_DECL_OVERRIDE
int count() const override
{
return m_data.count();
}
int indexOfObject(QObject *object) const Q_DECL_OVERRIDE
int indexOfObject(QObject *object) const override
{
int index = 0;
QMapIterator<quint32, Type *> it(m_data);
......@@ -95,7 +95,7 @@ public:
return -1;
}
QObject *objectAt(int index) const Q_DECL_OVERRIDE
QObject *objectAt(int index) const override
{
return (m_data.constBegin() + index).value();
}
......
......@@ -43,7 +43,7 @@ class ModuleManager : public QObject
Q_PROPERTY(QStringList loadedModules READ loadedModules NOTIFY loadedModulesChanged)
public:
ModuleManager(QObject *parent = nullptr);
~ModuleManager();
~ModuleManager() override;
bool combineSinks() const;
void setCombineSinks(bool combineSinks);
bool switchOnConnect() const;
......
......@@ -35,7 +35,7 @@ class Port : public Profile
public:
Port(QObject *parent);
virtual ~Port();
~Port() override;
template<typename PAInfo>
void setInfo(const PAInfo *info)
......
......@@ -44,7 +44,7 @@ public:
Q_ENUM(Availability)
Profile(QObject *parent);
virtual ~Profile();
~Profile() override;
template<typename PAInfo>
void setInfo(const PAInfo *info)
......
......@@ -39,10 +39,10 @@ public:
};
~AbstractModel() override;
QHash<int, QByteArray> roleNames() const Q_DECL_FINAL;
int rowCount(const QModelIndex &parent = QModelIndex()) const Q_DECL_FINAL;
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const Q_DECL_OVERRIDE;
bool setData(const QModelIndex &index, const QVariant &value, int role) Q_DECL_FINAL;
QHash<int, QByteArray> roleNames() const final;
int rowCount(const QModelIndex &parent = QModelIndex()) const final;
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
bool setData(const QModelIndex &index, const QVariant &value, int role) final;
Q_INVOKABLE int role(const QByteArray &roleName) const;
......@@ -91,7 +91,7 @@ public:
SinkModel(QObject *parent = nullptr);
Sink *defaultSink() const;
Sink *preferredSink() const;
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const Q_DECL_OVERRIDE;
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
signals:
void defaultSinkChanged();
......@@ -125,7 +125,7 @@ public:
SourceModel(QObject *parent = nullptr);
Source *defaultSource() const;
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const Q_DECL_OVERRIDE;
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
signals:
void defaultSourceChanged();
......
......@@ -67,7 +67,7 @@ signals:
protected:
PulseObject(QObject *parent);
virtual ~PulseObject();
~PulseObject() override;
Context *context() const;
quint32 m_index;
......
......@@ -50,7 +50,7 @@ signals:
void displayNameChanged();
protected:
virtual void componentComplete() Q_DECL_OVERRIDE Q_DECL_FINAL;
void componentComplete() final;
private:
QString m_name;
......
......@@ -28,7 +28,7 @@ class Plugin : public QQmlExtensionPlugin
Q_OBJECT
Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
public:
virtual void registerTypes(const char * uri);
void registerTypes(const char * uri) override;
};
#endif // PLUGIN_H
......@@ -32,7 +32,7 @@ class VolumeFeedback : public QObject
public:
explicit VolumeFeedback(QObject *parent = nullptr);
~VolumeFeedback();
~VolumeFeedback() override;
bool isValid() const;
......
......@@ -33,13 +33,13 @@ public:
Sink(QObject *parent);
void update(const pa_sink_info *info);
void setVolume(qint64 volume) Q_DECL_OVERRIDE;
void setMuted(bool muted) Q_DECL_OVERRIDE;
void setActivePortIndex(quint32 port_index) Q_DECL_OVERRIDE;
void setChannelVolume(int channel, qint64 volume) Q_DECL_OVERRIDE;
void setVolume(qint64 volume) override;
void setMuted(bool muted) override;
void setActivePortIndex(quint32 port_index) override;
void setChannelVolume(int channel, qint64 volume) override;
bool isDefault() const Q_DECL_OVERRIDE;
void setDefault(bool enable) Q_DECL_OVERRIDE;
bool isDefault() const override;
void setDefault(bool enable) override;
};
} // QPulseAudio
......
......@@ -36,10 +36,10 @@ public:
void setSinkIndex(quint32 sinkIndex);
void setVolume(qint64 volume) Q_DECL_OVERRIDE;
void setMuted(bool muted) Q_DECL_OVERRIDE;
void setChannelVolume(int channel, qint64 volume) Q_DECL_OVERRIDE;
void setDeviceIndex(quint32 deviceIndex) Q_DECL_OVERRIDE;
void setVolume(qint64 volume) override;
void setMuted(bool muted) override;
void setChannelVolume(int channel, qint64 volume) override;
void setDeviceIndex(quint32 deviceIndex) override;
};
} // QPulseAudio
......
......@@ -33,13 +33,13 @@ public:
Source(QObject *parent);
void update(const pa_source_info *info);
void setVolume(qint64 volume) Q_DECL_OVERRIDE;
void setMuted(bool muted) Q_DECL_OVERRIDE;
void setActivePortIndex(quint32 port_index) Q_DECL_OVERRIDE;
void setChannelVolume(int channel, qint64 volume) Q_DECL_OVERRIDE;
void setVolume(qint64 volume) override;
void setMuted(bool muted) override;
void setActivePortIndex(quint32 port_index) override;
void setChannelVolume(int channel, qint64 volume) override;
bool isDefault() const Q_DECL_OVERRIDE;
void setDefault(bool enable) Q_DECL_OVERRIDE;
bool isDefault() const override;
void setDefault(bool enable) override;
};
} // QPulseAudio
......
......@@ -34,10 +34,10 @@ public:
void update(const pa_source_output_info *info);
void setVolume(qint64 volume) Q_DECL_OVERRIDE;
void setMuted(bool muted) Q_DECL_OVERRIDE;
void setChannelVolume(int channel, qint64 volume) Q_DECL_OVERRIDE;
void setDeviceIndex(quint32 deviceIndex) Q_DECL_OVERRIDE;
void setVolume(qint64 volume) override;
void setMuted(bool muted) override;
void setChannelVolume(int channel, qint64 volume) override;
void setDeviceIndex(quint32 deviceIndex) override;
};
} // QPulseAudio
......
......@@ -92,7 +92,7 @@ signals:
protected:
Stream(QObject *parent);
virtual ~Stream();
~Stream() override;
quint32 m_deviceIndex;
......
......@@ -39,7 +39,7 @@ class VolumeObject : public PulseObject
Q_PROPERTY(QList<qreal> channelVolumes READ channelVolumes NOTIFY channelVolumesChanged)
public:
VolumeObject(QObject *parent);
virtual ~VolumeObject();
~VolumeObject() override;
template <typename PAInfo>
void updateVolumeObject(PAInfo *info)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment