Commit 9071d74a authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Remove extra ; use nullptr use override

parent 25342928
......@@ -74,7 +74,7 @@ KMixWindow : public KXmlGuiWindow
void fixConfigAfterRead();
bool queryClose() Q_DECL_OVERRIDE;
bool queryClose() override;
public slots:
void controlsChange(ControlManager::ChangeType changeType);
......
......@@ -42,18 +42,18 @@ public:
explicit Mixer_ALSA(Mixer *mixer, int device = -1 );
~Mixer_ALSA();
int readVolumeFromHW( const QString& id, shared_ptr<MixDevice> md ) Q_DECL_OVERRIDE;
int writeVolumeToHW ( const QString& id, shared_ptr<MixDevice> md ) Q_DECL_OVERRIDE;
void setEnumIdHW( const QString& id, unsigned int) Q_DECL_OVERRIDE;
unsigned int enumIdHW(const QString& id) Q_DECL_OVERRIDE;
bool hasChangedControls() Q_DECL_OVERRIDE;
int readVolumeFromHW( const QString& id, shared_ptr<MixDevice> md ) override;
int writeVolumeToHW ( const QString& id, shared_ptr<MixDevice> md ) override;
void setEnumIdHW( const QString& id, unsigned int) override;
unsigned int enumIdHW(const QString& id) override;
bool hasChangedControls() override;
bool needsPolling() Q_DECL_OVERRIDE { return false; }
QString getDriverName() Q_DECL_OVERRIDE;
bool needsPolling() override { return false; }
QString getDriverName() override;
protected:
int open() Q_DECL_OVERRIDE;
int close() Q_DECL_OVERRIDE;
int open() override;
int close() override;
int id2num(const QString& id);
private:
......@@ -68,7 +68,7 @@ private:
int identify( snd_mixer_selem_id_t *sid );
snd_mixer_elem_t* getMixerElem(int devnum);
QString errorText(int mixer_error) Q_DECL_OVERRIDE;
QString errorText(int mixer_error) override;
typedef QList<snd_mixer_selem_id_t *>AlsaMixerSidList;
AlsaMixerSidList mixer_sid_list;
typedef QList<snd_mixer_elem_t *> AlsaMixerElemList;
......
......@@ -115,20 +115,20 @@ class Mixer_MPRIS2 : public Mixer_Backend
public:
Mixer_MPRIS2(Mixer *mixer, int device);
virtual ~Mixer_MPRIS2();
QString getDriverName() Q_DECL_OVERRIDE;
QString getId() const Q_DECL_OVERRIDE { return _id; };
int open() Q_DECL_OVERRIDE;
int close() Q_DECL_OVERRIDE;
int readVolumeFromHW( const QString& id, shared_ptr<MixDevice> ) Q_DECL_OVERRIDE;
int writeVolumeToHW( const QString& id, shared_ptr<MixDevice> ) Q_DECL_OVERRIDE;
void setEnumIdHW(const QString& id, unsigned int) Q_DECL_OVERRIDE;
unsigned int enumIdHW(const QString& id) Q_DECL_OVERRIDE;
bool needsPolling() Q_DECL_OVERRIDE { return false; }
int mediaPlay(QString id) Q_DECL_OVERRIDE;
int mediaPrev(QString id) Q_DECL_OVERRIDE;
int mediaNext(QString id) Q_DECL_OVERRIDE;
QString getDriverName() override;
QString getId() const override { return _id; };
int open() override;
int close() override;
int readVolumeFromHW( const QString& id, shared_ptr<MixDevice> ) override;
int writeVolumeToHW( const QString& id, shared_ptr<MixDevice> ) override;
void setEnumIdHW(const QString& id, unsigned int) override;
unsigned int enumIdHW(const QString& id) override;
bool needsPolling() override { return false; }
int mediaPlay(QString id) override;
int mediaPrev(QString id) override;
int mediaNext(QString id) override;
virtual int mediaControl(QString id, QString command);
static MediaController::PlayState mprisPlayStateString2PlayState(const QString& playbackStatus);
......
......@@ -32,16 +32,16 @@ public:
Mixer_OSS(Mixer *mixer, int device);
virtual ~Mixer_OSS();
QString errorText(int mixer_error) Q_DECL_OVERRIDE;
int readVolumeFromHW( const QString& id, shared_ptr<MixDevice> ) Q_DECL_OVERRIDE;
int writeVolumeToHW ( const QString& id, shared_ptr<MixDevice> ) Q_DECL_OVERRIDE;
QString errorText(int mixer_error) override;
int readVolumeFromHW( const QString& id, shared_ptr<MixDevice> ) override;
int writeVolumeToHW ( const QString& id, shared_ptr<MixDevice> ) override;
QString getDriverName() Q_DECL_OVERRIDE;
QString getDriverName() override;
protected:
int open() Q_DECL_OVERRIDE;
int close() Q_DECL_OVERRIDE;
int open() override;
int close() override;
virtual QString deviceName( int );
virtual QString deviceNameDevfs( int );
......
......@@ -53,16 +53,16 @@ class Mixer_PULSE : public Mixer_Backend
Mixer_PULSE(Mixer *mixer, int devnum);
virtual ~Mixer_PULSE();
int readVolumeFromHW( const QString& id, shared_ptr<MixDevice> ) Q_DECL_OVERRIDE;
int writeVolumeToHW ( const QString& id, shared_ptr<MixDevice> ) Q_DECL_OVERRIDE;
int readVolumeFromHW( const QString& id, shared_ptr<MixDevice> ) override;
int writeVolumeToHW ( const QString& id, shared_ptr<MixDevice> ) override;
QString currentStreamDevice(const QString &id) const Q_DECL_OVERRIDE;
bool moveStream( const QString& id, const QString& destId ) Q_DECL_OVERRIDE;
QString currentStreamDevice(const QString &id) const override;
bool moveStream( const QString& id, const QString& destId ) override;
QString getDriverName() Q_DECL_OVERRIDE;
QString getId() const Q_DECL_OVERRIDE { return _id; };
QString getDriverName() override;
QString getId() const override { return _id; };
bool needsPolling() Q_DECL_OVERRIDE { return false; }
bool needsPolling() override { return false; }
void triggerUpdate();
void addWidget(int index, bool = false);
......@@ -72,8 +72,8 @@ class Mixer_PULSE : public Mixer_Backend
int id2num(const QString& id);
protected:
int open() Q_DECL_OVERRIDE;
int close() Q_DECL_OVERRIDE;
int open() override;
int close() override;
int fd;
QString _id;
......@@ -89,7 +89,7 @@ class Mixer_PULSE : public Mixer_Backend
void pulseControlsReconfigured();
public:
void reinit() Q_DECL_OVERRIDE;
void reinit() override;
};
......
......@@ -131,7 +131,7 @@ private:
/**
* @Override
*/
void usrReadConfig() Q_DECL_OVERRIDE;
void usrReadConfig() override;
/**
* @Override
*/
......
......@@ -83,16 +83,16 @@ public:
// Methods for handling the switches. This methods are useful, because the Sswitch in the Volume object
// is an abstract concept. It places no interpretation on the meaning of the switch (e.g. does "switch set" mean
// "mute on", or does it mean "playback on".
bool isMuted() const Q_DECL_OVERRIDE;
void setMuted(bool value) Q_DECL_OVERRIDE;
bool isRecSource() const Q_DECL_OVERRIDE;
void setRecSource(bool value) Q_DECL_OVERRIDE;
bool isEnum() const Q_DECL_OVERRIDE;
bool isMuted() const override;
void setMuted(bool value) override;
bool isRecSource() const override;
void setRecSource(bool value) override;
bool isEnum() const override;
// Refresh the composite from its components
void update();
Volume &playbackVolume() Q_DECL_OVERRIDE;
Volume &playbackVolume() override;
//virtual Volume& captureVolume();
private:
......
......@@ -37,8 +37,8 @@ class DialogAddView : public DialogBase
DialogAddView(QWidget *parent, Mixer *mixer);
virtual ~DialogAddView() = default;
QString getresultViewName() { return resultViewName; }
QString getresultMixerId() { return resultMixerId; }
QString getresultViewName() const { return resultViewName; }
QString getresultMixerId() const { return resultMixerId; }
public slots:
void apply();
......
......@@ -137,7 +137,7 @@ bool DialogChooseBackends::getAndResetModifyFlag()
return modifiedOld;
}
bool DialogChooseBackends::getModifyFlag()
bool DialogChooseBackends::getModifyFlag() const
{
return modified;
}
......
......@@ -41,7 +41,7 @@ public:
QSet<QString> getChosenBackends();
bool getAndResetModifyFlag();
bool getModifyFlag();
bool getModifyFlag() const;
signals:
void backendsModified();
......
......@@ -34,7 +34,7 @@ class DialogSelectMaster : public DialogBase
Q_OBJECT
public:
explicit DialogSelectMaster(Mixer *mixer = 0, QWidget *parent = 0);
explicit DialogSelectMaster(Mixer *mixer = nullptr, QWidget *parent = nullptr);
virtual ~DialogSelectMaster() = default;
public slots:
......
......@@ -169,7 +169,7 @@ protected:
/**
* @reimp
**/
virtual bool eventFilter(QObject *obj, QEvent *ev) Q_DECL_OVERRIDE;
virtual bool eventFilter(QObject *obj, QEvent *ev) override;
private slots:
void restoreConfigInternal();
......
......@@ -69,26 +69,26 @@ class DialogViewConfigurationWidget : public QListWidget
{
Q_OBJECT
public:
explicit DialogViewConfigurationWidget(QWidget *parent=0);
explicit DialogViewConfigurationWidget(QWidget *parent=nullptr);
void setActiveList(bool isActiveList) {
m_activeList = isActiveList;
}
bool isActiveList() const { return m_activeList; };
bool isActiveList() const { return m_activeList; }
Q_SIGNALS:
void dropped(DialogViewConfigurationWidget* list, int index, DialogViewConfigurationItem* item);
protected:
QMimeData* mimeData(const QList<QListWidgetItem*> items) const Q_DECL_OVERRIDE;
bool dropMimeData(int index, const QMimeData * mimeData, Qt::DropAction action) Q_DECL_OVERRIDE;
QMimeData* mimeData(const QList<QListWidgetItem*> items) const override;
bool dropMimeData(int index, const QMimeData * mimeData, Qt::DropAction action) override;
Qt::DropActions supportedDropActions() const Q_DECL_OVERRIDE
Qt::DropActions supportedDropActions() const override
{
//qCDebug(KMIX_LOG) << "supportedDropActions!";
return Qt::MoveAction;
}
QStringList mimeTypes() const Q_DECL_OVERRIDE
QStringList mimeTypes() const override
{
//qCDebug(KMIX_LOG) << "mimeTypes!";
return QStringList() << "application/x-kde-action-list";
......@@ -96,7 +96,7 @@ protected:
// Skip internal dnd handling in QListWidget ---- how is one supposed to figure this out
// without reading the QListWidget code !?
void dropEvent(QDropEvent* ev) Q_DECL_OVERRIDE {
void dropEvent(QDropEvent* ev) override {
QAbstractItemView::dropEvent(ev);
}
......
......@@ -613,7 +613,7 @@ void ProfControl::setVisibility(const QString &visString)
setVisibility(visibilityFromString(visString));
}
void ProfControl::setSubcontrols(QString sctls)
void ProfControl::setSubcontrols(const QString &sctls)
{
_subcontrols = sctls;
......
......@@ -77,7 +77,7 @@ public:
QString name() const { return (_name); }
void setName(const QString &name) { _name = name; }
void setSubcontrols(QString sctls);
void setSubcontrols(const QString &sctls);
bool useSubcontrolPlayback() const { return (_useSubcontrolPlayback); }
bool useSubcontrolCapture() const { return (_useSubcontrolCapture); }
bool useSubcontrolPlaybackSwitch() const { return (_useSubcontrolPlaybackSwitch); }
......@@ -211,9 +211,9 @@ public:
// Enumeration for the scope
enum ProfileScope { NONE, SOUNDCARD };
bool startDocument() Q_DECL_OVERRIDE;
bool startElement( const QString&, const QString&, const QString& , const QXmlAttributes& ) Q_DECL_OVERRIDE;
bool endElement( const QString&, const QString&, const QString& ) Q_DECL_OVERRIDE;
bool startDocument() override;
bool startElement( const QString&, const QString&, const QString& , const QXmlAttributes& ) override;
bool endElement( const QString&, const QString&, const QString& ) override;
private:
void addControl(const QXmlAttributes& attributes);
......
......@@ -55,7 +55,7 @@ class KMixDockWidget : public KStatusNotifierItem
public slots:
void setVolumeTip();
void updatePixmap();
void activate(const QPoint &pos) Q_DECL_OVERRIDE;
void activate(const QPoint &pos) override;
void controlsChange(ControlManager::ChangeType changeType);
protected:
......
......@@ -49,8 +49,8 @@
KMixerWidget contains
a TabBar with n Tabs (at least one per soundcard). These contain View's with sliders, switches and other GUI elements visualizing the Mixer)
*/
KMixerWidget::KMixerWidget( Mixer *mixer,
QWidget * parent, ViewBase::ViewFlags vflags, QString guiprofId,
KMixerWidget::KMixerWidget(Mixer *mixer,
QWidget * parent, ViewBase::ViewFlags vflags, const QString &guiprofId,
KActionCollection* actionCollection )
: QWidget( parent ), _mixer(mixer),
m_topLayout(0), _guiprofId(guiprofId),
......
......@@ -53,12 +53,12 @@ class KMixerWidget : public QWidget
public:
explicit KMixerWidget( Mixer *mixer,
QWidget *parent, ViewBase::ViewFlags vflags, QString guiprofId, KActionCollection* coll = 0 );
QWidget *parent, ViewBase::ViewFlags vflags, const QString &guiprofId, KActionCollection* coll = nullptr );
~KMixerWidget();
Mixer *mixer() { return _mixer; }
ViewBase* currentView();
GUIProfile* getGuiprof() { return GUIProfile::find(_guiprofId); };
GUIProfile* getGuiprof() { return GUIProfile::find(_guiprofId); }
signals:
......
......@@ -61,19 +61,19 @@ private slots:
void kmixConfigHasChangedEmitter();
protected:
void showEvent(QShowEvent * event) Q_DECL_OVERRIDE;
void showEvent(QShowEvent * event) override;
/**
* Orientation is not supported by default => implement manually
* @Override
*/
void updateWidgets() Q_DECL_OVERRIDE;
void updateWidgets() override;
/**
* Orientation is not supported by default => implement manually
* @Override
*/
void updateSettings() Q_DECL_OVERRIDE;
void updateSettings() override;
bool hasChanged() Q_DECL_OVERRIDE;
bool hasChanged() override;
private:
static KMixPrefDlg* instance;
......
......@@ -40,9 +40,9 @@ class KSmallSlider : public QAbstractSlider
/* void setChid(Volume::ChannelID chid) { this->chid = chid; };
Volume::ChannelID getChid() { return chid; };*/
QSize sizeHint() const Q_DECL_OVERRIDE;
QSize sizeHint() const override;
QSizePolicy sizePolicy() const;
QSize minimumSizeHint() const Q_DECL_OVERRIDE;
QSize minimumSizeHint() const override;
bool gray() const;
......@@ -57,12 +57,12 @@ public slots:
void valueChanged( int value );
protected:
void resizeEvent( QResizeEvent * ) Q_DECL_OVERRIDE;
void paintEvent( QPaintEvent * ) Q_DECL_OVERRIDE;
void resizeEvent( QResizeEvent * ) override;
void paintEvent( QPaintEvent * ) override;
void mousePressEvent( QMouseEvent * ) Q_DECL_OVERRIDE;
void mouseMoveEvent( QMouseEvent * ) Q_DECL_OVERRIDE;
void wheelEvent( QWheelEvent * ) Q_DECL_OVERRIDE;
void mousePressEvent( QMouseEvent * ) override;
void mouseMoveEvent( QMouseEvent * ) override;
void wheelEvent( QWheelEvent * ) override;
void valueChange();
......
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