[vlc-devel] [PATCH 2/3] qt4: Replace redundant virtual with Q_DECL_OVERRIDE
Uwe L. Korn
uwelk at xhochy.com
Tue Aug 19 00:05:06 CEST 2014
From: "Uwe L. Korn" <uwelk at xhochy.com>
Declaring a virtual function in a subclass as virtual may be a good
documentation that we are overriding a method from the superclass but
has no effect during compilation. With C++11, we can use the override
keyword for this (which will even trigger a compiler error if we try to
override a non-virtual function).
To stay backwards-compatible, we use Qt5's Q_DECL_OVERRIDE macro to
support C++ <11.
---
modules/gui/qt4/adapters/variables.hpp | 12 +--
modules/gui/qt4/components/controller.hpp | 16 ++--
modules/gui/qt4/components/controller_widget.hpp | 2 +-
modules/gui/qt4/components/epg/EPGChannels.hpp | 4 +-
modules/gui/qt4/components/epg/EPGItem.hpp | 10 +--
modules/gui/qt4/components/epg/EPGRuler.hpp | 4 +-
modules/gui/qt4/components/extended_panels.hpp | 13 +--
modules/gui/qt4/components/info_panels.hpp | 4 +-
modules/gui/qt4/components/interface_widgets.hpp | 26 +++---
modules/gui/qt4/components/open_panels.hpp | 30 +++----
modules/gui/qt4/components/playlist/playlist.hpp | 18 ++--
.../gui/qt4/components/playlist/playlist_model.hpp | 50 +++++------
modules/gui/qt4/components/playlist/selector.hpp | 12 +--
.../gui/qt4/components/playlist/standardpanel.hpp | 2 +-
modules/gui/qt4/components/playlist/views.hpp | 58 ++++++-------
modules/gui/qt4/components/playlist/vlc_model.hpp | 14 ++--
modules/gui/qt4/components/preferences_widgets.hpp | 96 +++++++++++-----------
.../gui/qt4/components/sout/profile_selector.hpp | 2 +-
modules/gui/qt4/components/sout/sout_widgets.hpp | 14 ++--
modules/gui/qt4/dialogs/convert.hpp | 4 +-
modules/gui/qt4/dialogs/extensions.hpp | 4 +-
modules/gui/qt4/dialogs/gototime.hpp | 4 +-
modules/gui/qt4/dialogs/help.hpp | 6 +-
modules/gui/qt4/dialogs/mediainfo.hpp | 2 +-
modules/gui/qt4/dialogs/openurl.hpp | 2 +-
modules/gui/qt4/dialogs/playlist.hpp | 2 +-
modules/gui/qt4/dialogs/plugins.hpp | 58 ++++++-------
modules/gui/qt4/dialogs/toolbar.hpp | 20 ++---
modules/gui/qt4/dialogs/vlm.hpp | 2 +-
modules/gui/qt4/main_interface.hpp | 18 ++--
modules/gui/qt4/styles/seekstyle.hpp | 6 +-
modules/gui/qt4/util/animators.hpp | 10 ++-
modules/gui/qt4/util/customwidgets.hpp | 13 +--
modules/gui/qt4/util/input_slider.hpp | 30 +++----
modules/gui/qt4/util/pictureflow.hpp | 4 +-
modules/gui/qt4/util/qvlcframe.hpp | 4 +-
modules/gui/qt4/util/searchlineedit.hpp | 16 ++--
modules/gui/qt4/util/timetooltip.hpp | 4 +-
modules/gui/qt4/util/validators.hpp | 6 +-
39 files changed, 310 insertions(+), 292 deletions(-)
diff --git a/modules/gui/qt4/adapters/variables.hpp b/modules/gui/qt4/adapters/variables.hpp
index 04f286c..fb0b4cb 100644
--- a/modules/gui/qt4/adapters/variables.hpp
+++ b/modules/gui/qt4/adapters/variables.hpp
@@ -25,6 +25,8 @@
# include <config.h>
#endif
+#include "qt4.hpp"
+
#include <QObject>
#include <vlc_common.h>
@@ -47,7 +49,7 @@ class QVLCPointer : public QVLCVariable
{
Q_OBJECT
private:
- virtual void trigger (vlc_value_t, vlc_value_t);
+ void trigger (vlc_value_t, vlc_value_t) Q_DECL_OVERRIDE;
public:
QVLCPointer (vlc_object_t *, const char *, bool inherit = false);
@@ -62,7 +64,7 @@ class QVLCInteger : public QVLCVariable
{
Q_OBJECT
private:
- virtual void trigger (vlc_value_t, vlc_value_t);
+ void trigger (vlc_value_t, vlc_value_t) Q_DECL_OVERRIDE;
public:
QVLCInteger (vlc_object_t *, const char *, bool inherit = false);
@@ -77,7 +79,7 @@ class QVLCBool : public QVLCVariable
{
Q_OBJECT
private:
- virtual void trigger (vlc_value_t, vlc_value_t);
+ void trigger (vlc_value_t, vlc_value_t) Q_DECL_OVERRIDE;
public:
QVLCBool (vlc_object_t *, const char *, bool inherit = false);
@@ -92,7 +94,7 @@ class QVLCFloat : public QVLCVariable
{
Q_OBJECT
private:
- virtual void trigger (vlc_value_t, vlc_value_t);
+ void trigger (vlc_value_t, vlc_value_t) Q_DECL_OVERRIDE;
public:
QVLCFloat (vlc_object_t *, const char *, bool inherit = false);
@@ -107,7 +109,7 @@ class QVLCString : public QVLCVariable
{
Q_OBJECT
private:
- virtual void trigger (vlc_value_t, vlc_value_t);
+ void trigger (vlc_value_t, vlc_value_t) Q_DECL_OVERRIDE;
public:
QVLCString (vlc_object_t *, const char *, bool inherit = false);
diff --git a/modules/gui/qt4/components/controller.hpp b/modules/gui/qt4/components/controller.hpp
index b22e430..3180bbc 100644
--- a/modules/gui/qt4/components/controller.hpp
+++ b/modules/gui/qt4/components/controller.hpp
@@ -275,14 +275,14 @@ public slots:
protected:
friend class MainInterface;
- virtual void mouseMoveEvent( QMouseEvent *event );
- virtual void mousePressEvent( QMouseEvent *event );
- virtual void mouseReleaseEvent( QMouseEvent *event );
- virtual void enterEvent( QEvent *event );
- virtual void leaveEvent( QEvent *event );
- virtual void keyPressEvent( QKeyEvent *event );
-
- virtual void customEvent( QEvent *event );
+ void mouseMoveEvent( QMouseEvent *event ) Q_DECL_OVERRIDE;
+ void mousePressEvent( QMouseEvent *event ) Q_DECL_OVERRIDE;
+ void mouseReleaseEvent( QMouseEvent *event ) Q_DECL_OVERRIDE;
+ void enterEvent( QEvent *event ) Q_DECL_OVERRIDE;
+ void leaveEvent( QEvent *event ) Q_DECL_OVERRIDE;
+ void keyPressEvent( QKeyEvent *event ) Q_DECL_OVERRIDE;
+
+ void customEvent( QEvent *event ) Q_DECL_OVERRIDE;
private slots:
void showFSC();
diff --git a/modules/gui/qt4/components/controller_widget.hpp b/modules/gui/qt4/components/controller_widget.hpp
index 8320175..f969670 100644
--- a/modules/gui/qt4/components/controller_widget.hpp
+++ b/modules/gui/qt4/components/controller_widget.hpp
@@ -102,7 +102,7 @@ public:
void setMuted( bool );
protected:
- virtual bool eventFilter( QObject *obj, QEvent *e );
+ bool eventFilter( QObject *obj, QEvent *e ) Q_DECL_OVERRIDE;
private:
intf_thread_t *p_intf;
diff --git a/modules/gui/qt4/components/epg/EPGChannels.hpp b/modules/gui/qt4/components/epg/EPGChannels.hpp
index c229657..7ed6cbd 100644
--- a/modules/gui/qt4/components/epg/EPGChannels.hpp
+++ b/modules/gui/qt4/components/epg/EPGChannels.hpp
@@ -23,6 +23,8 @@
#ifndef EPGCHANNELS_HPP
#define EPGCHANNELS_HPP
+#include "qt4.hpp"
+
#include <QWidget>
class EPGView;
@@ -39,7 +41,7 @@ public slots:
void removeChannel( QString );
protected:
- virtual void paintEvent( QPaintEvent *event );
+ void paintEvent( QPaintEvent *event ) Q_DECL_OVERRIDE;
private:
EPGView *m_epgView;
diff --git a/modules/gui/qt4/components/epg/EPGItem.hpp b/modules/gui/qt4/components/epg/EPGItem.hpp
index b4e1ea9..f5f9d9c 100644
--- a/modules/gui/qt4/components/epg/EPGItem.hpp
+++ b/modules/gui/qt4/components/epg/EPGItem.hpp
@@ -40,8 +40,8 @@ class EPGItem : public QGraphicsItem
public:
EPGItem( vlc_epg_event_t *data, EPGView *view );
- virtual QRectF boundingRect() const;
- virtual void paint( QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0 );
+ QRectF boundingRect() const Q_DECL_OVERRIDE;
+ void paint( QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0 ) Q_DECL_OVERRIDE;
const QDateTime& start() const;
QDateTime end() const;
@@ -60,9 +60,9 @@ public:
bool playsAt( const QDateTime & ) const;
protected:
- virtual void focusInEvent( QFocusEvent * event );
- virtual void hoverEnterEvent ( QGraphicsSceneHoverEvent * );
- virtual void hoverLeaveEvent ( QGraphicsSceneHoverEvent * );
+ void focusInEvent( QFocusEvent * event ) Q_DECL_OVERRIDE;
+ void hoverEnterEvent ( QGraphicsSceneHoverEvent * ) Q_DECL_OVERRIDE;
+ void hoverLeaveEvent ( QGraphicsSceneHoverEvent * ) Q_DECL_OVERRIDE;
private:
EPGView *m_view;
diff --git a/modules/gui/qt4/components/epg/EPGRuler.hpp b/modules/gui/qt4/components/epg/EPGRuler.hpp
index 25cbdb6..2c69f12 100644
--- a/modules/gui/qt4/components/epg/EPGRuler.hpp
+++ b/modules/gui/qt4/components/epg/EPGRuler.hpp
@@ -24,6 +24,8 @@
#ifndef EPGRULER_H
#define EPGRULER_H
+#include "qt4.hpp"
+
#include <QWidget>
#include <QDateTime>
@@ -42,7 +44,7 @@ public slots:
void setOffset( int offset );
protected:
- virtual void paintEvent( QPaintEvent *event );
+ void paintEvent( QPaintEvent *event ) Q_DECL_OVERRIDE;
private:
qreal m_scale;
diff --git a/modules/gui/qt4/components/extended_panels.hpp b/modules/gui/qt4/components/extended_panels.hpp
index b4c71ea..006d602 100644
--- a/modules/gui/qt4/components/extended_panels.hpp
+++ b/modules/gui/qt4/components/extended_panels.hpp
@@ -31,6 +31,7 @@
#include <vlc_common.h>
+#include "qt4.hpp"
#include "ui/equalizer.h"
#include "ui/video_effects.h"
@@ -71,7 +72,7 @@ class ExtV4l2 : public QWidget
public:
ExtV4l2( intf_thread_t *, QWidget * );
- virtual void showEvent( QShowEvent *event );
+ void showEvent( QShowEvent *event ) Q_DECL_OVERRIDE;
private:
intf_thread_t *p_intf;
@@ -156,13 +157,13 @@ public:
const slider_data_t *p_data, int index );
protected:
- virtual float initialValue();
+ float initialValue() Q_DECL_OVERRIDE;
int index;
QStringList getBandsFromAout() const;
public slots:
- virtual void onValueChanged( int i ) const;
- virtual void writeToConfig() const;
+ void onValueChanged( int i ) const Q_DECL_OVERRIDE;
+ void writeToConfig() const Q_DECL_OVERRIDE;
};
class Equalizer: public AudioFilterControlWidget
@@ -173,10 +174,10 @@ public:
Equalizer( intf_thread_t *, QWidget * );
protected:
- virtual void build();
+ void build() Q_DECL_OVERRIDE;
protected slots:
- virtual void setSaveToConfig( bool );
+ void setSaveToConfig( bool ) Q_DECL_OVERRIDE;
private:
FilterSliderData *preamp;
diff --git a/modules/gui/qt4/components/info_panels.hpp b/modules/gui/qt4/components/info_panels.hpp
index 90c7b4a..e2b7ac0 100644
--- a/modules/gui/qt4/components/info_panels.hpp
+++ b/modules/gui/qt4/components/info_panels.hpp
@@ -30,6 +30,8 @@
# include "config.h"
#endif
+#include "qt4.hpp"
+
#include <vlc_common.h>
#include <QWidget>
@@ -113,7 +115,7 @@ class InputStatsPanel: public QWidget
public:
InputStatsPanel( QWidget * );
protected:
- virtual void hideEvent( QHideEvent * );
+ void hideEvent( QHideEvent * ) Q_DECL_OVERRIDE;
private:
QTreeWidget *StatsTree;
QTreeWidgetItem *input;
diff --git a/modules/gui/qt4/components/interface_widgets.hpp b/modules/gui/qt4/components/interface_widgets.hpp
index 520039f..7796b2a 100644
--- a/modules/gui/qt4/components/interface_widgets.hpp
+++ b/modules/gui/qt4/components/interface_widgets.hpp
@@ -64,7 +64,7 @@ public:
void sync( void );
protected:
- virtual QPaintEngine *paintEngine() const
+ QPaintEngine *paintEngine() const Q_DECL_OVERRIDE
{
return NULL;
}
@@ -95,10 +95,10 @@ private:
bool b_expandPixmap;
bool b_withart;
QPropertyAnimation *fadeAnimation;
- virtual void contextMenuEvent( QContextMenuEvent *event );
+ void contextMenuEvent( QContextMenuEvent *event ) Q_DECL_OVERRIDE;
protected:
- void paintEvent( QPaintEvent *e );
- virtual void showEvent( QShowEvent * e );
+ void paintEvent( QPaintEvent *e ) Q_DECL_OVERRIDE;
+ void showEvent( QShowEvent * e ) Q_DECL_OVERRIDE;
static const int MARGIN = 5;
QString defaultArt;
public slots:
@@ -118,10 +118,10 @@ public slots:
void animate();
protected:
- void paintEvent( QPaintEvent *e );
- void showEvent( QShowEvent *e );
- void hideEvent( QHideEvent * );
- void resizeEvent( QResizeEvent * );
+ void paintEvent( QPaintEvent *e ) Q_DECL_OVERRIDE;
+ void showEvent( QShowEvent *e ) Q_DECL_OVERRIDE;
+ void hideEvent( QHideEvent * ) Q_DECL_OVERRIDE;
+ void resizeEvent( QResizeEvent * ) Q_DECL_OVERRIDE;
private slots:
void spawnFlakes();
@@ -161,7 +161,7 @@ class ClickableQLabel : public QLabel
{
Q_OBJECT
public:
- virtual void mouseDoubleClickEvent( QMouseEvent *event )
+ void mouseDoubleClickEvent( QMouseEvent *event ) Q_DECL_OVERRIDE
{
Q_UNUSED( event );
emit doubleClicked();
@@ -183,13 +183,13 @@ public:
TimeLabel( intf_thread_t *_p_intf, TimeLabel::Display _displayType = TimeLabel::Both );
protected:
- virtual void mousePressEvent( QMouseEvent *event )
+ void mousePressEvent( QMouseEvent *event ) Q_DECL_OVERRIDE
{
if( displayType == TimeLabel::Elapsed ) return;
toggleTimeDisplay();
event->accept();
}
- virtual void mouseDoubleClickEvent( QMouseEvent *event )
+ void mouseDoubleClickEvent( QMouseEvent *event ) Q_DECL_OVERRIDE
{
if( displayType != TimeLabel::Both ) return;
event->accept();
@@ -218,7 +218,7 @@ public:
virtual ~SpeedLabel();
protected:
- virtual void mousePressEvent ( QMouseEvent * event )
+ void mousePressEvent ( QMouseEvent * event ) Q_DECL_OVERRIDE
{
showSpeedMenu( event->pos() );
}
@@ -263,7 +263,7 @@ public:
virtual ~CoverArtLabel();
protected:
- virtual void mouseDoubleClickEvent( QMouseEvent *event )
+ void mouseDoubleClickEvent( QMouseEvent *event ) Q_DECL_OVERRIDE
{
if( ! p_item && qobject_cast<MetaPanel *>(this->window()) == NULL )
{
diff --git a/modules/gui/qt4/components/open_panels.hpp b/modules/gui/qt4/components/open_panels.hpp
index 4f541a1..01c5b88 100644
--- a/modules/gui/qt4/components/open_panels.hpp
+++ b/modules/gui/qt4/components/open_panels.hpp
@@ -102,7 +102,7 @@ class FileOpenPanel: public OpenPanel
public:
FileOpenPanel( QWidget *, intf_thread_t * );
virtual ~FileOpenPanel();
- virtual void clear() ;
+ void clear() Q_DECL_OVERRIDE;
virtual void accept() ;
protected:
bool eventFilter(QObject *, QEvent *event)
@@ -115,16 +115,16 @@ protected:
}
return false;
}
- virtual void dropEvent( QDropEvent *);
- virtual void dragEnterEvent( QDragEnterEvent * );
- virtual void dragMoveEvent( QDragMoveEvent * );
- virtual void dragLeaveEvent( QDragLeaveEvent * );
+ void dropEvent( QDropEvent *) Q_DECL_OVERRIDE;
+ void dragEnterEvent( QDragEnterEvent * ) Q_DECL_OVERRIDE;
+ void dragMoveEvent( QDragMoveEvent * ) Q_DECL_OVERRIDE;
+ void dragLeaveEvent( QDragLeaveEvent * ) Q_DECL_OVERRIDE;
private:
Ui::OpenFile ui;
FileOpenBox *dialogBox;
void BuildOldPanel();
public slots:
- virtual void updateMRL();
+ void updateMRL() Q_DECL_OVERRIDE;
private slots:
void browseFileSub();
void browseFile();
@@ -138,14 +138,14 @@ class NetOpenPanel: public OpenPanel
public:
NetOpenPanel( QWidget *, intf_thread_t * );
virtual ~NetOpenPanel();
- virtual void clear() ;
- virtual void onFocus();
- virtual void onAccept();
+ void clear() Q_DECL_OVERRIDE;
+ void onFocus() Q_DECL_OVERRIDE;
+ void onAccept() Q_DECL_OVERRIDE;
private:
Ui::OpenNetwork ui;
bool b_recentList;
public slots:
- virtual void updateMRL();
+ void updateMRL() Q_DECL_OVERRIDE;
};
class DiscOpenPanel: public OpenPanel
@@ -162,8 +162,8 @@ class DiscOpenPanel: public OpenPanel
public:
DiscOpenPanel( QWidget *, intf_thread_t * );
virtual ~DiscOpenPanel();
- virtual void clear() ;
- virtual void accept() ;
+ void clear() Q_DECL_OVERRIDE;
+ virtual void accept();
#if defined( _WIN32 ) || defined( __OS2__ )
virtual void onFocus();
#endif
@@ -172,7 +172,7 @@ private:
char *psz_dvddiscpath, *psz_vcddiscpath, *psz_cddadiscpath;
DiscType m_discType;
public slots:
- virtual void updateMRL() ;
+ void updateMRL() Q_DECL_OVERRIDE;
private slots:
void browseDevice();
void updateButtons() ;
@@ -186,7 +186,7 @@ class CaptureOpenPanel: public OpenPanel
public:
CaptureOpenPanel( QWidget *, intf_thread_t * );
virtual ~CaptureOpenPanel();
- virtual void clear() ;
+ void clear() Q_DECL_OVERRIDE;
private:
Ui::OpenCapture ui;
bool isInitialized;
@@ -213,7 +213,7 @@ private:
QDoubleSpinBox *screenFPS;
public slots:
- virtual void updateMRL();
+ void updateMRL() Q_DECL_OVERRIDE;
void initialize();
private slots:
void updateButtons();
diff --git a/modules/gui/qt4/components/playlist/playlist.hpp b/modules/gui/qt4/components/playlist/playlist.hpp
index 533a056..ca71f7a 100644
--- a/modules/gui/qt4/components/playlist/playlist.hpp
+++ b/modules/gui/qt4/components/playlist/playlist.hpp
@@ -72,9 +72,9 @@ private:
protected:
PlaylistWidget( intf_thread_t *_p_i, QWidget * );
- virtual void dropEvent( QDropEvent *);
- virtual void dragEnterEvent( QDragEnterEvent * );
- virtual void closeEvent( QCloseEvent * );
+ void dropEvent( QDropEvent *) Q_DECL_OVERRIDE;
+ void dragEnterEvent( QDragEnterEvent * ) Q_DECL_OVERRIDE;
+ void closeEvent( QCloseEvent * ) Q_DECL_OVERRIDE;
private slots:
void changeView( const QModelIndex& index );
@@ -100,10 +100,10 @@ public:
SplitterHandle( Qt::Orientation orientation, QSplitter * parent );
protected:
- virtual void paintEvent ( QPaintEvent * );
+ void paintEvent ( QPaintEvent * ) Q_DECL_OVERRIDE;
private:
- virtual QSize sizeHint () const;
+ QSize sizeHint () const Q_DECL_OVERRIDE;
};
#endif /* __APPLE__ */
@@ -111,9 +111,9 @@ class LocationButton : public QPushButton
{
public:
LocationButton( const QString &, bool bold, bool arrow, QWidget * parent = NULL );
- virtual QSize sizeHint() const;
+ QSize sizeHint() const Q_DECL_OVERRIDE;
protected:
- virtual void paintEvent ( QPaintEvent * event );
+ void paintEvent ( QPaintEvent * event ) Q_DECL_OVERRIDE;
private:
bool b_arrow;
};
@@ -128,9 +128,9 @@ public:
LocationBar( VLCModel * );
void setIndex( const QModelIndex & );
void setModel( VLCModel * _model ) { model = _model; };
- virtual QSize sizeHint() const;
+ QSize sizeHint() const Q_DECL_OVERRIDE;
protected:
- virtual void resizeEvent ( QResizeEvent * event );
+ void resizeEvent ( QResizeEvent * event ) Q_DECL_OVERRIDE;
private:
void layOut( const QSize& size );
diff --git a/modules/gui/qt4/components/playlist/playlist_model.hpp b/modules/gui/qt4/components/playlist/playlist_model.hpp
index f9d1d0c..b70b93d 100644
--- a/modules/gui/qt4/components/playlist/playlist_model.hpp
+++ b/modules/gui/qt4/components/playlist/playlist_model.hpp
@@ -73,39 +73,39 @@ public:
/*** QAbstractItemModel subclassing ***/
/* Data structure */
- virtual QVariant data( const QModelIndex &index, const int role ) const;
- virtual int rowCount( const QModelIndex &parent = QModelIndex() ) const;
- virtual Qt::ItemFlags flags( const QModelIndex &index ) const;
- virtual QModelIndex index( const int r, const int c, const QModelIndex &parent ) const;
- virtual QModelIndex parent( const QModelIndex &index ) const;
+ QVariant data( const QModelIndex &index, const int role ) const Q_DECL_OVERRIDE;
+ int rowCount( const QModelIndex &parent = QModelIndex() ) const Q_DECL_OVERRIDE;
+ Qt::ItemFlags flags( const QModelIndex &index ) const Q_DECL_OVERRIDE;
+ QModelIndex index( const int r, const int c, const QModelIndex &parent ) const Q_DECL_OVERRIDE;
+ QModelIndex parent( const QModelIndex &index ) const Q_DECL_OVERRIDE;
/* Drag and Drop */
- virtual Qt::DropActions supportedDropActions() const;
- virtual QMimeData* mimeData( const QModelIndexList &indexes ) const;
- virtual bool dropMimeData( const QMimeData *data, Qt::DropAction action,
- int row, int column, const QModelIndex &target );
- virtual QStringList mimeTypes() const;
+ Qt::DropActions supportedDropActions() const Q_DECL_OVERRIDE;
+ QMimeData* mimeData( const QModelIndexList &indexes ) const Q_DECL_OVERRIDE;
+ bool dropMimeData( const QMimeData *data, Qt::DropAction action,
+ int row, int column, const QModelIndex &target );
+ QStringList mimeTypes() const Q_DECL_OVERRIDE;
/* Sort */
- virtual void sort( const int column, Qt::SortOrder order = Qt::AscendingOrder );
+ void sort( const int column, Qt::SortOrder order = Qt::AscendingOrder ) Q_DECL_OVERRIDE;
/*** VLCModelSubInterface subclassing ***/
- virtual void rebuild( playlist_item_t * p = NULL );
- virtual void doDelete( QModelIndexList selected );
- virtual void createNode( QModelIndex index, QString name );
- virtual void renameNode( QModelIndex index, QString name );
- virtual void removeAll();
+ void rebuild( playlist_item_t * p = NULL ) Q_DECL_OVERRIDE;
+ void doDelete( QModelIndexList selected ) Q_DECL_OVERRIDE;
+ void createNode( QModelIndex index, QString name ) Q_DECL_OVERRIDE;
+ void renameNode( QModelIndex index, QString name ) Q_DECL_OVERRIDE;
+ void removeAll();
/* Lookups */
- virtual QModelIndex rootIndex() const;
- virtual void filter( const QString& search_text, const QModelIndex & root, bool b_recursive );
- virtual QModelIndex currentIndex() const;
- virtual QModelIndex indexByPLID( const int i_plid, const int c ) const;
- virtual QModelIndex indexByInputItemID( const int i_inputitem_id, const int c ) const;
- virtual bool isTree() const;
- virtual bool canEdit() const;
- virtual bool action( QAction *action, const QModelIndexList &indexes );
- virtual bool isSupportedAction( actions action, const QModelIndex & ) const;
+ QModelIndex rootIndex() const Q_DECL_OVERRIDE;
+ void filter( const QString& search_text, const QModelIndex & root, bool b_recursive ) Q_DECL_OVERRIDE;
+ QModelIndex currentIndex() const Q_DECL_OVERRIDE;
+ QModelIndex indexByPLID( const int i_plid, const int c ) const Q_DECL_OVERRIDE;
+ QModelIndex indexByInputItemID( const int i_inputitem_id, const int c ) const Q_DECL_OVERRIDE;
+ bool isTree() const Q_DECL_OVERRIDE;
+ bool canEdit() const Q_DECL_OVERRIDE;
+ bool action( QAction *action, const QModelIndexList &indexes ) Q_DECL_OVERRIDE;
+ bool isSupportedAction( actions action, const QModelIndex & ) const Q_DECL_OVERRIDE;
protected:
/* VLCModel subclassing */
diff --git a/modules/gui/qt4/components/playlist/selector.hpp b/modules/gui/qt4/components/playlist/selector.hpp
index 1c3ac1f..e21916d 100644
--- a/modules/gui/qt4/components/playlist/selector.hpp
+++ b/modules/gui/qt4/components/playlist/selector.hpp
@@ -74,7 +74,7 @@ enum ItemAction {
class SelectorActionButton : public QFramelessButton
{
protected:
- virtual void paintEvent( QPaintEvent * );
+ void paintEvent( QPaintEvent * ) Q_DECL_OVERRIDE;
};
class PLSelItem : public QWidget
@@ -124,11 +124,11 @@ public:
int getCurrentItemCategory();
protected:
- virtual void drawBranches ( QPainter *, const QRect &, const QModelIndex & ) const;
- virtual void dragMoveEvent ( QDragMoveEvent * event );
- virtual bool dropMimeData ( QTreeWidgetItem *, int, const QMimeData *, Qt::DropAction );
- virtual QStringList mimeTypes () const;
- virtual void wheelEvent(QWheelEvent *e);
+ void drawBranches ( QPainter *, const QRect &, const QModelIndex & ) const Q_DECL_OVERRIDE;
+ void dragMoveEvent ( QDragMoveEvent * event ) Q_DECL_OVERRIDE;
+ bool dropMimeData ( QTreeWidgetItem *, int, const QMimeData *, Qt::DropAction ) Q_DECL_OVERRIDE;
+ QStringList mimeTypes () const Q_DECL_OVERRIDE;
+ void wheelEvent(QWheelEvent *e) Q_DECL_OVERRIDE;
private:
void createItems();
diff --git a/modules/gui/qt4/components/playlist/standardpanel.hpp b/modules/gui/qt4/components/playlist/standardpanel.hpp
index 57ab0ae..7b1aa04 100644
--- a/modules/gui/qt4/components/playlist/standardpanel.hpp
+++ b/modules/gui/qt4/components/playlist/standardpanel.hpp
@@ -75,7 +75,7 @@ public:
protected:
VLCModel *model;
- virtual void wheelEvent( QWheelEvent *e );
+ void wheelEvent( QWheelEvent *e ) Q_DECL_OVERRIDE;
bool popup( const QPoint &point );
private:
diff --git a/modules/gui/qt4/components/playlist/views.hpp b/modules/gui/qt4/components/playlist/views.hpp
index c34aa2a..a1083be 100644
--- a/modules/gui/qt4/components/playlist/views.hpp
+++ b/modules/gui/qt4/components/playlist/views.hpp
@@ -52,9 +52,9 @@ class PlIconViewItemDelegate : public AbstractPlViewItemDelegate
public:
PlIconViewItemDelegate(QWidget *parent = 0) : AbstractPlViewItemDelegate( parent ) {}
- virtual void paint ( QPainter * painter, const QStyleOptionViewItem & option, const QModelIndex & index ) const;
- virtual QSize sizeHint ( const QStyleOptionViewItem & option = QStyleOptionViewItem(),
- const QModelIndex & index = QModelIndex() ) const;
+ void paint ( QPainter * painter, const QStyleOptionViewItem & option, const QModelIndex & index ) const Q_DECL_OVERRIDE;
+ QSize sizeHint ( const QStyleOptionViewItem & option = QStyleOptionViewItem(),
+ const QModelIndex & index = QModelIndex() ) const Q_DECL_OVERRIDE;
};
class PlListViewItemDelegate : public AbstractPlViewItemDelegate
@@ -64,8 +64,8 @@ class PlListViewItemDelegate : public AbstractPlViewItemDelegate
public:
PlListViewItemDelegate(QWidget *parent = 0) : AbstractPlViewItemDelegate(parent) {}
- virtual void paint ( QPainter * painter, const QStyleOptionViewItem & option, const QModelIndex & index ) const;
- virtual QSize sizeHint ( const QStyleOptionViewItem & option, const QModelIndex & index ) const;
+ void paint ( QPainter * painter, const QStyleOptionViewItem & option, const QModelIndex & index ) const Q_DECL_OVERRIDE;
+ QSize sizeHint ( const QStyleOptionViewItem & option, const QModelIndex & index ) const Q_DECL_OVERRIDE;
};
class PlTreeViewItemDelegate : public AbstractPlViewItemDelegate
@@ -75,7 +75,7 @@ class PlTreeViewItemDelegate : public AbstractPlViewItemDelegate
public:
PlTreeViewItemDelegate(QWidget *parent = 0) : AbstractPlViewItemDelegate(parent) {}
- virtual void paint ( QPainter * painter, const QStyleOptionViewItem & option, const QModelIndex & index ) const;
+ void paint ( QPainter * painter, const QStyleOptionViewItem & option, const QModelIndex & index ) const Q_DECL_OVERRIDE;
};
class CellPixmapDelegate : public QStyledItemDelegate
@@ -84,7 +84,7 @@ class CellPixmapDelegate : public QStyledItemDelegate
public:
CellPixmapDelegate(QWidget *parent = 0) : QStyledItemDelegate(parent) {}
- virtual void paint ( QPainter * painter, const QStyleOptionViewItem & option, const QModelIndex & index ) const;
+ void paint ( QPainter * painter, const QStyleOptionViewItem & option, const QModelIndex & index ) const Q_DECL_OVERRIDE;
};
class PlIconView : public QListView
@@ -94,9 +94,9 @@ class PlIconView : public QListView
public:
PlIconView( QAbstractItemModel *model, QWidget *parent = 0 );
protected:
- virtual void startDrag ( Qt::DropActions supportedActions );
- virtual void dragMoveEvent ( QDragMoveEvent * event );
- virtual bool viewportEvent ( QEvent * );
+ void startDrag ( Qt::DropActions supportedActions ) Q_DECL_OVERRIDE;
+ void dragMoveEvent ( QDragMoveEvent * event ) Q_DECL_OVERRIDE;
+ bool viewportEvent ( QEvent * ) Q_DECL_OVERRIDE;
};
class PlListView : public QListView
@@ -106,10 +106,10 @@ class PlListView : public QListView
public:
PlListView( QAbstractItemModel *model, QWidget *parent = 0 );
protected:
- virtual void startDrag ( Qt::DropActions supportedActions );
- virtual void dragMoveEvent ( QDragMoveEvent * event );
- virtual void keyPressEvent( QKeyEvent *event );
- virtual bool viewportEvent ( QEvent * );
+ void startDrag ( Qt::DropActions supportedActions ) Q_DECL_OVERRIDE;
+ void dragMoveEvent ( QDragMoveEvent * event ) Q_DECL_OVERRIDE;
+ void keyPressEvent( QKeyEvent *event ) Q_DECL_OVERRIDE;
+ bool viewportEvent ( QEvent * ) Q_DECL_OVERRIDE;
};
class PlTreeView : public QTreeView
@@ -119,10 +119,10 @@ class PlTreeView : public QTreeView
public:
PlTreeView( QAbstractItemModel *, QWidget *parent = 0 );
protected:
- virtual void startDrag ( Qt::DropActions supportedActions );
- virtual void dragMoveEvent ( QDragMoveEvent * event );
- virtual void keyPressEvent( QKeyEvent *event );
- virtual void setModel( QAbstractItemModel * );
+ void startDrag ( Qt::DropActions supportedActions ) Q_DECL_OVERRIDE;
+ void dragMoveEvent ( QDragMoveEvent * event ) Q_DECL_OVERRIDE;
+ void keyPressEvent( QKeyEvent *event ) Q_DECL_OVERRIDE;
+ void setModel( QAbstractItemModel * ) Q_DECL_OVERRIDE;
};
class PicFlowView : public QAbstractItemView
@@ -131,19 +131,19 @@ class PicFlowView : public QAbstractItemView
public:
PicFlowView( QAbstractItemModel *model, QWidget *parent = 0 );
- virtual QRect visualRect(const QModelIndex&) const;
- virtual void scrollTo(const QModelIndex&, QAbstractItemView::ScrollHint);
- virtual QModelIndex indexAt(const QPoint&) const;
- virtual void setModel(QAbstractItemModel *model);
+ QRect visualRect(const QModelIndex&) const Q_DECL_OVERRIDE;
+ void scrollTo(const QModelIndex&, QAbstractItemView::ScrollHint) Q_DECL_OVERRIDE;
+ QModelIndex indexAt(const QPoint&) const Q_DECL_OVERRIDE;
+ void setModel(QAbstractItemModel *model) Q_DECL_OVERRIDE;
protected:
- virtual int horizontalOffset() const;
- virtual int verticalOffset() const;
- virtual QModelIndex moveCursor(QAbstractItemView::CursorAction, Qt::KeyboardModifiers);
- virtual bool isIndexHidden(const QModelIndex&) const;
- virtual QRegion visualRegionForSelection(const QItemSelection&) const;
- virtual void setSelection(const QRect&, QFlags<QItemSelectionModel::SelectionFlag>);
- virtual bool viewportEvent ( QEvent * );
+ int horizontalOffset() const Q_DECL_OVERRIDE;
+ int verticalOffset() const Q_DECL_OVERRIDE;
+ QModelIndex moveCursor(QAbstractItemView::CursorAction, Qt::KeyboardModifiers) Q_DECL_OVERRIDE;
+ bool isIndexHidden(const QModelIndex&) const Q_DECL_OVERRIDE;
+ QRegion visualRegionForSelection(const QItemSelection&) const Q_DECL_OVERRIDE;
+ void setSelection(const QRect&, QFlags<QItemSelectionModel::SelectionFlag>) Q_DECL_OVERRIDE;
+ bool viewportEvent ( QEvent * ) Q_DECL_OVERRIDE;
private:
PictureFlow *picFlow;
diff --git a/modules/gui/qt4/components/playlist/vlc_model.hpp b/modules/gui/qt4/components/playlist/vlc_model.hpp
index 8ef4f92..b23b076 100644
--- a/modules/gui/qt4/components/playlist/vlc_model.hpp
+++ b/modules/gui/qt4/components/playlist/vlc_model.hpp
@@ -124,14 +124,14 @@ public:
virtual ~VLCModel();
/*** QAbstractItemModel subclassing ***/
- virtual int columnCount( const QModelIndex &parent = QModelIndex() ) const;
- QVariant headerData( int, Qt::Orientation, int ) const;
+ int columnCount( const QModelIndex &parent = QModelIndex() ) const Q_DECL_OVERRIDE;
+ QVariant headerData( int, Qt::Orientation, int ) const Q_DECL_OVERRIDE;
/*** VLCModelSubInterface subclassing ***/
- virtual int itemId( const QModelIndex &, int type ) const;
- virtual QString getURI( const QModelIndex &index ) const;
- virtual input_item_t *getInputItem( const QModelIndex & ) const;
- virtual QString getTitle( const QModelIndex &index ) const;
+ int itemId( const QModelIndex &, int type ) const Q_DECL_OVERRIDE;
+ QString getURI( const QModelIndex &index ) const Q_DECL_OVERRIDE;
+ input_item_t *getInputItem( const QModelIndex & ) const Q_DECL_OVERRIDE;
+ QString getTitle( const QModelIndex &index ) const Q_DECL_OVERRIDE;
/* Custom */
static int columnToMeta( int _column );
@@ -141,7 +141,7 @@ public:
public slots:
/* slots handlers */
- virtual void ensureArtRequested( const QModelIndex &index );
+ void ensureArtRequested( const QModelIndex &index ) Q_DECL_OVERRIDE;
signals:
void currentIndexChanged( const QModelIndex& );
diff --git a/modules/gui/qt4/components/preferences_widgets.hpp b/modules/gui/qt4/components/preferences_widgets.hpp
index 18d4955..714f688 100644
--- a/modules/gui/qt4/components/preferences_widgets.hpp
+++ b/modules/gui/qt4/components/preferences_widgets.hpp
@@ -118,7 +118,7 @@ class VIntConfigControl : public ConfigControl
Q_OBJECT
public:
virtual int getValue() const = 0;
- virtual int getType() const;
+ int getType() const Q_DECL_OVERRIDE;
virtual void doApply();
protected:
VIntConfigControl( vlc_object_t *a, module_config_t *b ) :
@@ -132,15 +132,15 @@ public:
IntegerConfigControl( vlc_object_t *, module_config_t *, QWidget * );
IntegerConfigControl( vlc_object_t *, module_config_t *,
QLabel*, QSpinBox* );
- virtual int getValue() const;
+ int getValue() const Q_DECL_OVERRIDE;
protected:
QSpinBox *spin;
- virtual void changeVisibility( bool b )
+ void changeVisibility( bool b ) Q_DECL_OVERRIDE
{
spin->setVisible( b );
if ( label ) label->setVisible( b );
}
- virtual void fillGrid( QGridLayout*, int );
+ void fillGrid( QGridLayout*, int ) Q_DECL_OVERRIDE;
private:
QLabel *label;
void finish();
@@ -165,10 +165,10 @@ class IntegerRangeSliderConfigControl : public VIntConfigControl
public:
IntegerRangeSliderConfigControl( vlc_object_t *, module_config_t *,
QLabel *, QSlider * );
- virtual int getValue() const;
+ int getValue() const Q_DECL_OVERRIDE;
protected:
QSlider *slider;
- virtual void changeVisibility( bool b )
+ void changeVisibility( bool b ) Q_DECL_OVERRIDE
{
slider->setVisible( b );
if ( label ) label->setVisible( b );
@@ -185,14 +185,14 @@ public:
IntegerListConfigControl( vlc_object_t *, module_config_t *, QWidget *, bool );
IntegerListConfigControl( vlc_object_t *, module_config_t *, QLabel *,
QComboBox*, bool );
- virtual int getValue() const;
+ int getValue() const Q_DECL_OVERRIDE;
protected:
- virtual void changeVisibility( bool b )
+ void changeVisibility( bool b ) Q_DECL_OVERRIDE
{
combo->setVisible( b );
if ( label ) label->setVisible( b );
}
- virtual void fillGrid( QGridLayout*, int );
+ void fillGrid( QGridLayout*, int ) Q_DECL_OVERRIDE;
private:
void finish(module_config_t * );
QLabel *label;
@@ -207,14 +207,14 @@ public:
BoolConfigControl( vlc_object_t *, module_config_t *, QWidget * );
BoolConfigControl( vlc_object_t *, module_config_t *,
QLabel *, QAbstractButton* );
- virtual int getValue() const;
- virtual int getType() const;
+ int getValue() const Q_DECL_OVERRIDE;
+ int getType() const Q_DECL_OVERRIDE;
protected:
- virtual void changeVisibility( bool b )
+ void changeVisibility( bool b ) Q_DECL_OVERRIDE
{
checkbox->setVisible( b );
}
- virtual void fillGrid( QGridLayout*, int );
+ void fillGrid( QGridLayout*, int ) Q_DECL_OVERRIDE;
private:
QAbstractButton *checkbox;
void finish();
@@ -228,14 +228,14 @@ public:
ColorConfigControl( vlc_object_t *, module_config_t *,
QLabel *, QAbstractButton* );
virtual ~ColorConfigControl() { delete color_px; }
- virtual int getValue() const;
+ int getValue() const Q_DECL_OVERRIDE;
protected:
- virtual void changeVisibility( bool b )
+ void changeVisibility( bool b ) Q_DECL_OVERRIDE
{
color_but->setVisible( b );
if ( label ) label->setVisible( b );
}
- virtual void fillGrid( QGridLayout*, int );
+ void fillGrid( QGridLayout*, int ) Q_DECL_OVERRIDE;
private:
QLabel *label;
QAbstractButton *color_but;
@@ -254,8 +254,8 @@ class VFloatConfigControl : public ConfigControl
Q_OBJECT
public:
virtual float getValue() const = 0;
- virtual int getType() const;
- virtual void doApply();
+ int getType() const Q_DECL_OVERRIDE;
+ void doApply() Q_DECL_OVERRIDE;
protected:
VFloatConfigControl( vlc_object_t *a, module_config_t *b ) :
ConfigControl(a,b) {};
@@ -268,15 +268,15 @@ public:
FloatConfigControl( vlc_object_t *, module_config_t *, QWidget * );
FloatConfigControl( vlc_object_t *, module_config_t *,
QLabel*, QDoubleSpinBox* );
- virtual float getValue() const;
+ float getValue() const Q_DECL_OVERRIDE;
protected:
- virtual void changeVisibility( bool b )
+ void changeVisibility( bool b ) Q_DECL_OVERRIDE
{
spin->setVisible( b );
if ( label ) label->setVisible( b );
}
- virtual void fillGrid( QGridLayout*, int );
+ void fillGrid( QGridLayout*, int ) Q_DECL_OVERRIDE;
QDoubleSpinBox *spin;
private:
@@ -303,8 +303,8 @@ class VStringConfigControl : public ConfigControl
Q_OBJECT
public:
virtual QString getValue() const = 0;
- virtual int getType() const;
- virtual void doApply();
+ int getType() const Q_DECL_OVERRIDE;
+ void doApply() Q_DECL_OVERRIDE;
protected:
VStringConfigControl( vlc_object_t *a, module_config_t *b ) :
ConfigControl(a,b) {};
@@ -318,14 +318,14 @@ public:
QWidget *, bool pwd );
StringConfigControl( vlc_object_t *, module_config_t *, QLabel *,
QLineEdit*, bool pwd );
- virtual QString getValue() const { return text->text(); };
+ QString getValue() const Q_DECL_OVERRIDE { return text->text(); };
protected:
- virtual void changeVisibility( bool b )
+ void changeVisibility( bool b ) Q_DECL_OVERRIDE
{
text->setVisible( b );
if ( label ) label->setVisible( b );
}
- virtual void fillGrid( QGridLayout*, int );
+ void fillGrid( QGridLayout*, int ) Q_DECL_OVERRIDE;
private:
void finish();
QLineEdit *text;
@@ -339,17 +339,17 @@ public:
FileConfigControl( vlc_object_t *, module_config_t *, QWidget * );
FileConfigControl( vlc_object_t *, module_config_t *, QLabel *,
QLineEdit *, QPushButton * );
- virtual QString getValue() const { return text->text(); };
+ QString getValue() const Q_DECL_OVERRIDE { return text->text(); };
public slots:
virtual void updateField();
protected:
- virtual void changeVisibility( bool b )
+ void changeVisibility( bool b ) Q_DECL_OVERRIDE
{
text->setVisible( b );
browse->setVisible( b );
if ( label ) label->setVisible( b );
}
- virtual void fillGrid( QGridLayout*, int );
+ void fillGrid( QGridLayout*, int ) Q_DECL_OVERRIDE;
void finish();
QLineEdit *text;
QLabel *label;
@@ -364,7 +364,7 @@ public:
DirectoryConfigControl( vlc_object_t *, module_config_t *, QLabel *,
QLineEdit *, QPushButton * );
public slots:
- virtual void updateField();
+ void updateField() Q_DECL_OVERRIDE;
};
class FontConfigControl : public VStringConfigControl
@@ -374,14 +374,14 @@ public:
FontConfigControl( vlc_object_t *, module_config_t *, QWidget * );
FontConfigControl( vlc_object_t *, module_config_t *, QLabel *,
QFontComboBox *);
- virtual QString getValue() const { return font->currentFont().family(); }
+ QString getValue() const Q_DECL_OVERRIDE { return font->currentFont().family(); }
protected:
- virtual void changeVisibility( bool b )
+ void changeVisibility( bool b ) Q_DECL_OVERRIDE
{
font->setVisible( b );
if ( label ) label->setVisible( b );
}
- virtual void fillGrid( QGridLayout*, int );
+ void fillGrid( QGridLayout*, int ) Q_DECL_OVERRIDE;
QLabel *label;
QFontComboBox *font;
};
@@ -393,14 +393,14 @@ public:
ModuleConfigControl( vlc_object_t *, module_config_t *, QWidget * );
ModuleConfigControl( vlc_object_t *, module_config_t *, QLabel *,
QComboBox* );
- virtual QString getValue() const;
+ QString getValue() const Q_DECL_OVERRIDE;
protected:
- virtual void changeVisibility( bool b )
+ void changeVisibility( bool b ) Q_DECL_OVERRIDE
{
combo->setVisible( b );
if ( label ) label->setVisible( b );
}
- virtual void fillGrid( QGridLayout*, int );
+ void fillGrid( QGridLayout*, int ) Q_DECL_OVERRIDE;
private:
void finish( );
QLabel *label;
@@ -421,12 +421,12 @@ public:
// ModuleListConfigControl( vlc_object_t *, module_config_t *, QLabel *,
// QComboBox*, bool );
virtual ~ModuleListConfigControl();
- virtual QString getValue() const;
+ QString getValue() const Q_DECL_OVERRIDE;
public slots:
void onUpdate();
protected:
- virtual void changeVisibility( bool );
- virtual void fillGrid( QGridLayout*, int );
+ void changeVisibility( bool ) Q_DECL_OVERRIDE;
+ void fillGrid( QGridLayout*, int ) Q_DECL_OVERRIDE;
private:
void finish( bool );
void checkbox_lists(module_t*);
@@ -443,14 +443,14 @@ public:
StringListConfigControl( vlc_object_t *, module_config_t *, QWidget * );
StringListConfigControl( vlc_object_t *, module_config_t *, QLabel *,
QComboBox*, bool );
- virtual QString getValue() const;
+ QString getValue() const Q_DECL_OVERRIDE;
protected:
- virtual void changeVisibility( bool b )
+ void changeVisibility( bool b ) Q_DECL_OVERRIDE
{
combo->setVisible( b );
if ( label ) label->setVisible( b );
}
- virtual void fillGrid( QGridLayout*, int );
+ void fillGrid( QGridLayout*, int ) Q_DECL_OVERRIDE;
QComboBox *combo;
private:
void finish(module_config_t * );
@@ -476,7 +476,7 @@ public:
StringConfigControl( vlc_object_t *, module_config_t *, QWidget *, bool
bycat );
virtual ~StringConfigControl();
- virtual QString getValue();
+ QString getValue() Q_DECL_OVERRIDE;
private:
QVector<ModuleCheckBox> checkboxes;
QLineEdit *text;
@@ -494,17 +494,17 @@ class KeySelectorControl : public ConfigControl
public:
KeySelectorControl( vlc_object_t *, module_config_t *, QWidget * );
- virtual int getType() const;
- virtual void doApply();
+ int getType() const Q_DECL_OVERRIDE;
+ void doApply() Q_DECL_OVERRIDE;
protected:
- virtual bool eventFilter( QObject *, QEvent * );
- virtual void changeVisibility( bool b )
+ bool eventFilter( QObject *, QEvent * ) Q_DECL_OVERRIDE;
+ void changeVisibility( bool b ) Q_DECL_OVERRIDE
{
table->setVisible( b );
if ( label ) label->setVisible( b );
}
- virtual void fillGrid( QGridLayout*, int );
+ void fillGrid( QGridLayout*, int ) Q_DECL_OVERRIDE;
private:
void buildAppHotkeysList( QWidget *rootWidget );
diff --git a/modules/gui/qt4/components/sout/profile_selector.hpp b/modules/gui/qt4/components/sout/profile_selector.hpp
index 5afcc13..1b732b1 100644
--- a/modules/gui/qt4/components/sout/profile_selector.hpp
+++ b/modules/gui/qt4/components/sout/profile_selector.hpp
@@ -82,7 +82,7 @@ private:
void loadCapabilities();
void reset();
protected slots:
- virtual void close();
+ void close() Q_DECL_OVERRIDE;
private slots:
void muxSelected();
void codecSelected();
diff --git a/modules/gui/qt4/components/sout/sout_widgets.hpp b/modules/gui/qt4/components/sout/sout_widgets.hpp
index a03c32f..1c3e6a7 100644
--- a/modules/gui/qt4/components/sout/sout_widgets.hpp
+++ b/modules/gui/qt4/components/sout/sout_widgets.hpp
@@ -66,7 +66,7 @@ class FileDestBox: public VirtualDestBox
Q_OBJECT
public:
FileDestBox( QWidget *_parent = NULL, intf_thread_t * = NULL );
- virtual QString getMRL( const QString& );
+ QString getMRL( const QString& ) Q_DECL_OVERRIDE;
private:
QLineEdit *fileEdit;
intf_thread_t *p_intf;
@@ -79,7 +79,7 @@ class HTTPDestBox: public VirtualDestBox
Q_OBJECT
public:
HTTPDestBox( QWidget *_parent = NULL );
- virtual QString getMRL( const QString& );
+ QString getMRL( const QString& ) Q_DECL_OVERRIDE;
private:
QLineEdit *HTTPEdit;
QSpinBox *HTTPPort;
@@ -90,7 +90,7 @@ class MMSHDestBox: public VirtualDestBox
Q_OBJECT
public:
MMSHDestBox( QWidget *_parent = NULL );
- virtual QString getMRL( const QString& );
+ QString getMRL( const QString& ) Q_DECL_OVERRIDE;
private:
QLineEdit *MMSHEdit;
QSpinBox *MMSHPort;
@@ -101,7 +101,7 @@ class RTSPDestBox: public VirtualDestBox
Q_OBJECT
public:
RTSPDestBox( QWidget *_parent = NULL );
- virtual QString getMRL( const QString& );
+ QString getMRL( const QString& ) Q_DECL_OVERRIDE;
private:
QLineEdit *RTSPEdit;
QSpinBox *RTSPPort;
@@ -112,7 +112,7 @@ class UDPDestBox: public VirtualDestBox
Q_OBJECT
public:
UDPDestBox( QWidget *_parent = NULL );
- virtual QString getMRL( const QString& );
+ QString getMRL( const QString& ) Q_DECL_OVERRIDE;
private:
QLineEdit *UDPEdit;
QSpinBox *UDPPort;
@@ -123,7 +123,7 @@ class RTPDestBox: public VirtualDestBox
Q_OBJECT
public:
RTPDestBox( QWidget *_parent = NULL, const char *mux = NULL );
- virtual QString getMRL( const QString& );
+ QString getMRL( const QString& ) Q_DECL_OVERRIDE;
private:
QLineEdit *RTPEdit;
QSpinBox *RTPPort;
@@ -136,7 +136,7 @@ class ICEDestBox: public VirtualDestBox
Q_OBJECT
public:
ICEDestBox( QWidget *_parent = NULL );
- virtual QString getMRL( const QString& );
+ QString getMRL( const QString& ) Q_DECL_OVERRIDE;
private:
QLineEdit *ICEEdit;
QLineEdit *ICEMountEdit;
diff --git a/modules/gui/qt4/dialogs/convert.hpp b/modules/gui/qt4/dialogs/convert.hpp
index c2b6a38..9a9727e 100644
--- a/modules/gui/qt4/dialogs/convert.hpp
+++ b/modules/gui/qt4/dialogs/convert.hpp
@@ -50,8 +50,8 @@ private:
VLCProfileSelector *profile;
QString mrl;
private slots:
- virtual void close();
- virtual void cancel();
+ void close() Q_DECL_OVERRIDE;
+ void cancel() Q_DECL_OVERRIDE;
void fileBrowse();
void setDestinationFileExtension();
void validate();
diff --git a/modules/gui/qt4/dialogs/extensions.hpp b/modules/gui/qt4/dialogs/extensions.hpp
index c4ae037..63c49ca 100644
--- a/modules/gui/qt4/dialogs/extensions.hpp
+++ b/modules/gui/qt4/dialogs/extensions.hpp
@@ -106,8 +106,8 @@ private:
void DestroyWidget( extension_widget_t *p_widget, bool b_cond = true );
protected:
- virtual void closeEvent( QCloseEvent* );
- virtual void keyPressEvent( QKeyEvent* );
+ void closeEvent( QCloseEvent* ) Q_DECL_OVERRIDE;
+ void keyPressEvent( QKeyEvent* ) Q_DECL_OVERRIDE;
private slots:
int TriggerClick( QObject *object );
diff --git a/modules/gui/qt4/dialogs/gototime.hpp b/modules/gui/qt4/dialogs/gototime.hpp
index 59e1fb0..9f980b2 100644
--- a/modules/gui/qt4/dialogs/gototime.hpp
+++ b/modules/gui/qt4/dialogs/gototime.hpp
@@ -37,8 +37,8 @@ private:
virtual ~GotoTimeDialog();
QTimeEdit *timeEdit;
private slots:
- void close();
- void cancel();
+ void close() Q_DECL_OVERRIDE;
+ void cancel() Q_DECL_OVERRIDE;
void reset();
friend class Singleton<GotoTimeDialog>;
diff --git a/modules/gui/qt4/dialogs/help.hpp b/modules/gui/qt4/dialogs/help.hpp
index 3ef58fe..79851bd 100644
--- a/modules/gui/qt4/dialogs/help.hpp
+++ b/modules/gui/qt4/dialogs/help.hpp
@@ -45,7 +45,7 @@ private:
virtual ~HelpDialog();
public slots:
- virtual void close() { toggleVisible(); }
+ void close() Q_DECL_OVERRIDE { toggleVisible(); }
friend class Singleton<HelpDialog>;
};
@@ -62,7 +62,7 @@ public slots:
protected:
bool eventFilter(QObject *obj, QEvent *event);
- virtual void showEvent ( QShowEvent * );
+ void showEvent ( QShowEvent * ) Q_DECL_OVERRIDE;
private:
bool b_advanced;
@@ -93,7 +93,7 @@ private:
bool b_checked;
private slots:
- virtual void close() { toggleVisible(); }
+ void close() Q_DECL_OVERRIDE { toggleVisible(); }
void UpdateOrDownload();
diff --git a/modules/gui/qt4/dialogs/mediainfo.hpp b/modules/gui/qt4/dialogs/mediainfo.hpp
index f6f9af7..7740208 100644
--- a/modules/gui/qt4/dialogs/mediainfo.hpp
+++ b/modules/gui/qt4/dialogs/mediainfo.hpp
@@ -70,7 +70,7 @@ private slots:
void updateAllTabs( input_item_t * );
void clearAllTabs();
- virtual void close();
+ void close() Q_DECL_OVERRIDE;
void saveMeta();
void updateButtons( int i_tab );
diff --git a/modules/gui/qt4/dialogs/openurl.hpp b/modules/gui/qt4/dialogs/openurl.hpp
index 3fb0929..8522f93 100644
--- a/modules/gui/qt4/dialogs/openurl.hpp
+++ b/modules/gui/qt4/dialogs/openurl.hpp
@@ -56,7 +56,7 @@ public:
void showEvent( QShowEvent *ev );
public slots:
- virtual void close() { play(); };
+ void close() Q_DECL_OVERRIDE { play(); };
};
diff --git a/modules/gui/qt4/dialogs/playlist.hpp b/modules/gui/qt4/dialogs/playlist.hpp
index f7a2e49..a5fb283 100644
--- a/modules/gui/qt4/dialogs/playlist.hpp
+++ b/modules/gui/qt4/dialogs/playlist.hpp
@@ -46,7 +46,7 @@ public:
bool hasPlaylistWidget();
protected:
- virtual void hideEvent( QHideEvent * );
+ void hideEvent( QHideEvent * ) Q_DECL_OVERRIDE;
private:
PlaylistWidget *playlistWidget;
diff --git a/modules/gui/qt4/dialogs/plugins.hpp b/modules/gui/qt4/dialogs/plugins.hpp
index d49c70c..9b3523e 100644
--- a/modules/gui/qt4/dialogs/plugins.hpp
+++ b/modules/gui/qt4/dialogs/plugins.hpp
@@ -87,7 +87,7 @@ public:
};
protected:
- virtual void keyPressEvent( QKeyEvent *keyEvent );
+ void keyPressEvent( QKeyEvent *keyEvent ) Q_DECL_OVERRIDE;
private:
PluginTab( intf_thread_t *p_intf );
@@ -108,7 +108,7 @@ class ExtensionTab : public QVLCFrame
Q_OBJECT
protected:
- virtual void keyPressEvent( QKeyEvent *keyEvent );
+ void keyPressEvent( QKeyEvent *keyEvent ) Q_DECL_OVERRIDE;
private:
ExtensionTab( intf_thread_t *p_intf );
@@ -195,10 +195,10 @@ public:
FilenameRole
};
- virtual QVariant data( const QModelIndex& index, int role ) const;
- virtual QModelIndex index( int row, int column = 0,
- const QModelIndex& = QModelIndex() ) const;
- virtual int rowCount( const QModelIndex& = QModelIndex() ) const;
+ QVariant data( const QModelIndex& index, int role ) const Q_DECL_OVERRIDE;
+ QModelIndex index( int row, int column = 0,
+ const QModelIndex& = QModelIndex() ) const Q_DECL_OVERRIDE;
+ int rowCount( const QModelIndex& = QModelIndex() ) const Q_DECL_OVERRIDE;
protected slots:
void updateList();
@@ -214,12 +214,12 @@ class AddonsListModel: public ExtensionListModel
public:
AddonsListModel( AddonsManager *AM, QObject *parent = 0 );
- virtual QVariant data( const QModelIndex& index, int role ) const;
- virtual QModelIndex index( int row, int column = 0,
- const QModelIndex& = QModelIndex() ) const;
- virtual int rowCount( const QModelIndex& = QModelIndex() ) const;
- virtual Qt::ItemFlags flags( const QModelIndex &index ) const;
- virtual bool setData( const QModelIndex &index, const QVariant &value, int role );
+ QVariant data( const QModelIndex& index, int role ) const Q_DECL_OVERRIDE;
+ QModelIndex index( int row, int column = 0,
+ const QModelIndex& = QModelIndex() ) const Q_DECL_OVERRIDE;
+ int rowCount( const QModelIndex& = QModelIndex() ) const Q_DECL_OVERRIDE;
+ Qt::ItemFlags flags( const QModelIndex &index ) const Q_DECL_OVERRIDE;
+ bool setData( const QModelIndex &index, const QVariant &value, int role ) Q_DECL_OVERRIDE;
enum
{
@@ -268,7 +268,7 @@ public slots:
virtual void setStatusFilter( int );
protected:
- virtual bool filterAcceptsRow( int, const QModelIndex & ) const;
+ bool filterAcceptsRow( int, const QModelIndex & ) const Q_DECL_OVERRIDE;
private:
int i_type_filter;
@@ -283,13 +283,13 @@ public:
ExtensionItemDelegate( QObject *parent );
virtual ~ExtensionItemDelegate();
- virtual void paint( QPainter *painter,
- const QStyleOptionViewItem &option,
- const QModelIndex &index ) const;
- virtual QSize sizeHint( const QStyleOptionViewItem &option,
- const QModelIndex &index ) const;
- virtual void initStyleOption( QStyleOptionViewItem *option,
- const QModelIndex &index ) const;
+ void paint( QPainter *painter,
+ const QStyleOptionViewItem &option,
+ const QModelIndex &index ) const Q_DECL_OVERRIDE;
+ QSize sizeHint( const QStyleOptionViewItem &option,
+ const QModelIndex &index ) const Q_DECL_OVERRIDE;
+ void initStyleOption( QStyleOptionViewItem *option,
+ const QModelIndex &index ) const Q_DECL_OVERRIDE;
protected:
QMargins margins;
@@ -304,15 +304,15 @@ public:
AddonItemDelegate( QObject *parent );
~AddonItemDelegate();
- virtual void paint( QPainter *painter,
- const QStyleOptionViewItem &option,
- const QModelIndex &index ) const;
- virtual QSize sizeHint( const QStyleOptionViewItem &option,
- const QModelIndex &index ) const;
- virtual QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const;
- virtual void updateEditorGeometry(QWidget *editor, const QStyleOptionViewItem &option, const QModelIndex &index) const;
- virtual void setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const;
- virtual void setEditorData(QWidget *editor, const QModelIndex &index) const;
+ void paint( QPainter *painter,
+ const QStyleOptionViewItem &option,
+ const QModelIndex &index ) const Q_DECL_OVERRIDE;
+ QSize sizeHint( const QStyleOptionViewItem &option,
+ const QModelIndex &index ) const Q_DECL_OVERRIDE;
+ QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const Q_DECL_OVERRIDE;
+ void updateEditorGeometry(QWidget *editor, const QStyleOptionViewItem &option, const QModelIndex &index) const Q_DECL_OVERRIDE;
+ void setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const Q_DECL_OVERRIDE;
+ void setEditorData(QWidget *editor, const QModelIndex &index) const Q_DECL_OVERRIDE;
void setAnimator( DelegateAnimationHelper *animator );
diff --git a/modules/gui/qt4/dialogs/toolbar.hpp b/modules/gui/qt4/dialogs/toolbar.hpp
index 276decb..c2073d8 100644
--- a/modules/gui/qt4/dialogs/toolbar.hpp
+++ b/modules/gui/qt4/dialogs/toolbar.hpp
@@ -59,8 +59,8 @@ public slots:
void setBarsTopPosition( int b );
protected:
- virtual void paintEvent(QPaintEvent *);
- virtual bool eventFilter(QObject *obj, QEvent *event);
+ void paintEvent(QPaintEvent *) Q_DECL_OVERRIDE;
+ bool eventFilter(QObject *obj, QEvent *event) Q_DECL_OVERRIDE;
private:
QWidget * bars[3];
@@ -73,7 +73,7 @@ class WidgetListing : public QListWidget
public:
WidgetListing( intf_thread_t *, QWidget *_parent = 0 );
protected:
- virtual void startDrag( Qt::DropActions /*supportedActions*/ );
+ void startDrag( Qt::DropActions /*supportedActions*/ ) Q_DECL_OVERRIDE;
private:
ToolbarEditDialog *parent;
};
@@ -114,16 +114,16 @@ public:
void resetLine( const QString& );
protected:
- virtual void createAndAddWidget( QBoxLayout *controlLayout, int i_index,
- buttonType_e i_type, int i_option );
- virtual void dragEnterEvent ( QDragEnterEvent * event );
- virtual void dragMoveEvent(QDragMoveEvent *event);
- virtual void dropEvent ( QDropEvent * event );
- virtual void dragLeaveEvent ( QDragLeaveEvent * event );
+ void createAndAddWidget( QBoxLayout *controlLayout, int i_index,
+ buttonType_e i_type, int i_option ) Q_DECL_OVERRIDE;
+ void dragEnterEvent ( QDragEnterEvent * event ) Q_DECL_OVERRIDE;
+ void dragMoveEvent(QDragMoveEvent *event) Q_DECL_OVERRIDE;
+ void dropEvent ( QDropEvent * event ) Q_DECL_OVERRIDE;
+ void dragLeaveEvent ( QDragLeaveEvent * event ) Q_DECL_OVERRIDE;
virtual void doAction( int );
- virtual bool eventFilter( QObject *, QEvent * );
+ bool eventFilter( QObject *, QEvent * ) Q_DECL_OVERRIDE;
private:
struct doubleInt
diff --git a/modules/gui/qt4/dialogs/vlm.hpp b/modules/gui/qt4/dialogs/vlm.hpp
index a3c6e5d..2bdd20e 100644
--- a/modules/gui/qt4/dialogs/vlm.hpp
+++ b/modules/gui/qt4/dialogs/vlm.hpp
@@ -187,7 +187,7 @@ public:
VLMBroadcast( const QString& name, const QString& input,
const QString& inputOptions, const QString& output,
bool _enable, bool _loop, VLMDialog *parent );
- void update();
+ void update() Q_DECL_OVERRIDE;
private:
bool b_looped;
bool b_playing;
diff --git a/modules/gui/qt4/main_interface.hpp b/modules/gui/qt4/main_interface.hpp
index 73ff968..12ddd0d 100644
--- a/modules/gui/qt4/main_interface.hpp
+++ b/modules/gui/qt4/main_interface.hpp
@@ -96,15 +96,15 @@ protected:
#ifdef _WIN32
virtual bool winEvent( MSG *, long * );
#endif
- virtual void changeEvent( QEvent * );
- virtual void dropEvent( QDropEvent *);
- virtual void dragEnterEvent( QDragEnterEvent * );
- virtual void dragMoveEvent( QDragMoveEvent * );
- virtual void dragLeaveEvent( QDragLeaveEvent * );
- virtual void closeEvent( QCloseEvent *);
- virtual void keyPressEvent( QKeyEvent *);
- virtual void wheelEvent( QWheelEvent * );
- virtual bool eventFilter(QObject *, QEvent *);
+ void changeEvent( QEvent * ) Q_DECL_OVERRIDE;
+ void dropEvent( QDropEvent *) Q_DECL_OVERRIDE;
+ void dragEnterEvent( QDragEnterEvent * ) Q_DECL_OVERRIDE;
+ void dragMoveEvent( QDragMoveEvent * ) Q_DECL_OVERRIDE;
+ void dragLeaveEvent( QDragLeaveEvent * ) Q_DECL_OVERRIDE;
+ void closeEvent( QCloseEvent *) Q_DECL_OVERRIDE;
+ void keyPressEvent( QKeyEvent *) Q_DECL_OVERRIDE;
+ void wheelEvent( QWheelEvent * ) Q_DECL_OVERRIDE;
+ bool eventFilter(QObject *, QEvent *) Q_DECL_OVERRIDE;
private:
/* Main Widgets Creation */
diff --git a/modules/gui/qt4/styles/seekstyle.hpp b/modules/gui/qt4/styles/seekstyle.hpp
index 33947bb..953963d 100644
--- a/modules/gui/qt4/styles/seekstyle.hpp
+++ b/modules/gui/qt4/styles/seekstyle.hpp
@@ -23,6 +23,8 @@
#ifndef SEEKSTYLE_HPP
#define SEEKSTYLE_HPP
+#include "qt4.hpp"
+
#include <inttypes.h>
#include <QProxyStyle>
#include <QStyleOptionSlider>
@@ -44,8 +46,8 @@ public:
public:
SeekStyle();
- virtual int pixelMetric(PixelMetric metric, const QStyleOption * option = 0, const QWidget * widget = 0) const;
- virtual void drawComplexControl(ComplexControl cc, const QStyleOptionComplex *opt, QPainter *p, const QWidget *widget) const;
+ int pixelMetric(PixelMetric metric, const QStyleOption * option = 0, const QWidget * widget = 0) const Q_DECL_OVERRIDE;
+ void drawComplexControl(ComplexControl cc, const QStyleOptionComplex *opt, QPainter *p, const QWidget *widget) const Q_DECL_OVERRIDE;
};
#endif // SEEKSTYLE_HPP
diff --git a/modules/gui/qt4/util/animators.hpp b/modules/gui/qt4/util/animators.hpp
index 42d5f6e..a2ca77d 100644
--- a/modules/gui/qt4/util/animators.hpp
+++ b/modules/gui/qt4/util/animators.hpp
@@ -21,6 +21,8 @@
#ifndef ANIMATORS_HPP
#define ANIMATORS_HPP
+#include "qt4.hpp"
+
#include <QObject>
#include <QList>
#include <QString>
@@ -38,13 +40,13 @@ class BasicAnimator : public QAbstractAnimation
public:
BasicAnimator( QObject *parent = 0 );
void setFps( int _fps ) { fps = _fps; interval = 1000.0 / fps; }
- virtual int duration() const { return 1000; }
+ int duration() const Q_DECL_OVERRIDE { return 1000; }
signals:
void frameChanged();
protected:
- virtual void updateCurrentTime ( int msecs );
+ void updateCurrentTime ( int msecs ) Q_DECL_OVERRIDE;
int fps;
int interval;
int current_frame;
@@ -62,11 +64,11 @@ class PixmapAnimator : public BasicAnimator
public:
PixmapAnimator( QWidget *parent, QList<QString> _frames );
- virtual int duration() const { return interval * pixmaps.count(); }
+ int duration() const Q_DECL_OVERRIDE { return interval * pixmaps.count(); }
virtual ~PixmapAnimator();
QPixmap *getPixmap() { return currentPixmap; }
protected:
- virtual void updateCurrentTime ( int msecs );
+ void updateCurrentTime ( int msecs ) Q_DECL_OVERRIDE;
QList<QPixmap *> pixmaps;
QPixmap *currentPixmap;
signals:
diff --git a/modules/gui/qt4/util/customwidgets.hpp b/modules/gui/qt4/util/customwidgets.hpp
index e1e6c6d..2d05fb1 100644
--- a/modules/gui/qt4/util/customwidgets.hpp
+++ b/modules/gui/qt4/util/customwidgets.hpp
@@ -38,6 +38,7 @@
#include <QDial>
#include "animators.hpp"
+#include "qt4.hpp"
class QPixmap;
class QWidget;
@@ -47,9 +48,9 @@ class QFramelessButton : public QPushButton
Q_OBJECT
public:
QFramelessButton( QWidget *parent = NULL );
- virtual QSize sizeHint() const { return iconSize(); }
+ QSize sizeHint() const Q_DECL_OVERRIDE { return iconSize(); }
protected:
- virtual void paintEvent( QPaintEvent * event );
+ void paintEvent( QPaintEvent * event ) Q_DECL_OVERRIDE;
};
class VLCQDial : public QDial
@@ -58,7 +59,7 @@ class VLCQDial : public QDial
public:
VLCQDial( QWidget *parent = NULL );
protected:
- virtual void paintEvent( QPaintEvent * event );
+ void paintEvent( QPaintEvent * event ) Q_DECL_OVERRIDE;
};
class QToolButtonExt : public QToolButton
@@ -85,7 +86,7 @@ public:
QWidget * parent = NULL );
void setElideMode( Qt::TextElideMode );
protected:
- virtual void paintEvent( QPaintEvent * event );
+ void paintEvent( QPaintEvent * event ) Q_DECL_OVERRIDE;
private:
Qt::TextElideMode elideMode;
};
@@ -107,9 +108,9 @@ class QVLCDebugLevelSpinBox : public QSpinBox
public:
QVLCDebugLevelSpinBox( QWidget *parent ) : QSpinBox( parent ) { };
protected:
- virtual QString textFromValue( int ) const;
+ QString textFromValue( int ) const Q_DECL_OVERRIDE;
/* QVLCDebugLevelSpinBox is read-only */
- virtual int valueFromText( const QString& ) const { return -1; }
+ int valueFromText( const QString& ) const Q_DECL_OVERRIDE { return -1; }
};
/** This spinning icon, to the colors of the VLC cone, will show
diff --git a/modules/gui/qt4/util/input_slider.hpp b/modules/gui/qt4/util/input_slider.hpp
index 873b729..d21f732 100644
--- a/modules/gui/qt4/util/input_slider.hpp
+++ b/modules/gui/qt4/util/input_slider.hpp
@@ -59,18 +59,18 @@ public:
void setChapters( SeekPoints * );
protected:
- virtual void mouseMoveEvent( QMouseEvent *event );
- virtual void mousePressEvent( QMouseEvent* event );
- virtual void mouseReleaseEvent( QMouseEvent *event );
- virtual void wheelEvent( QWheelEvent *event );
- virtual void enterEvent( QEvent * );
- virtual void leaveEvent( QEvent * );
- virtual void hideEvent( QHideEvent * );
- virtual void paintEvent(QPaintEvent *ev);
+ void mouseMoveEvent( QMouseEvent *event ) Q_DECL_OVERRIDE;
+ void mousePressEvent( QMouseEvent* event ) Q_DECL_OVERRIDE;
+ void mouseReleaseEvent( QMouseEvent *event ) Q_DECL_OVERRIDE;
+ void wheelEvent( QWheelEvent *event ) Q_DECL_OVERRIDE;
+ void enterEvent( QEvent * ) Q_DECL_OVERRIDE;
+ void leaveEvent( QEvent * ) Q_DECL_OVERRIDE;
+ void hideEvent( QHideEvent * ) Q_DECL_OVERRIDE;
+ void paintEvent(QPaintEvent *ev) Q_DECL_OVERRIDE;
- virtual bool eventFilter( QObject *obj, QEvent *event );
+ bool eventFilter( QObject *obj, QEvent *event ) Q_DECL_OVERRIDE;
- virtual QSize sizeHint() const;
+ QSize sizeHint() const Q_DECL_OVERRIDE;
void processReleasedButton();
qreal handleOpacity() const;
@@ -137,11 +137,11 @@ protected:
const static int paddingL = 3;
const static int paddingR = 2;
- virtual void paintEvent( QPaintEvent *);
- virtual void wheelEvent( QWheelEvent *event );
- virtual void mousePressEvent( QMouseEvent * );
- virtual void mouseMoveEvent( QMouseEvent * );
- virtual void mouseReleaseEvent( QMouseEvent * );
+ void paintEvent( QPaintEvent *) Q_DECL_OVERRIDE;
+ void wheelEvent( QWheelEvent *event ) Q_DECL_OVERRIDE;
+ void mousePressEvent( QMouseEvent * ) Q_DECL_OVERRIDE;
+ void mouseMoveEvent( QMouseEvent * ) Q_DECL_OVERRIDE;
+ void mouseReleaseEvent( QMouseEvent * ) Q_DECL_OVERRIDE;
void processReleasedButton();
diff --git a/modules/gui/qt4/util/pictureflow.hpp b/modules/gui/qt4/util/pictureflow.hpp
index 1aaf924..a4b310a 100644
--- a/modules/gui/qt4/util/pictureflow.hpp
+++ b/modules/gui/qt4/util/pictureflow.hpp
@@ -315,8 +315,8 @@ public:
PictureFlowSoftwareRenderer();
~PictureFlowSoftwareRenderer();
- virtual void init();
- virtual void paint();
+ void init() Q_DECL_OVERRIDE;
+ void paint() Q_DECL_OVERRIDE;
private:
QSize size;
diff --git a/modules/gui/qt4/util/qvlcframe.hpp b/modules/gui/qt4/util/qvlcframe.hpp
index 2747a4a..3706f4d 100644
--- a/modules/gui/qt4/util/qvlcframe.hpp
+++ b/modules/gui/qt4/util/qvlcframe.hpp
@@ -133,7 +133,7 @@ protected:
{
hide();
}
- virtual void keyPressEvent( QKeyEvent *keyEvent )
+ void keyPressEvent( QKeyEvent *keyEvent ) Q_DECL_OVERRIDE
{
if( keyEvent->key() == Qt::Key_Escape )
{
@@ -171,7 +171,7 @@ protected:
{
hide();
}
- virtual void keyPressEvent( QKeyEvent *keyEvent )
+ void keyPressEvent( QKeyEvent *keyEvent ) Q_DECL_OVERRIDE
{
if( keyEvent->key() == Qt::Key_Escape )
{
diff --git a/modules/gui/qt4/util/searchlineedit.hpp b/modules/gui/qt4/util/searchlineedit.hpp
index fe81b30..7134fb2 100644
--- a/modules/gui/qt4/util/searchlineedit.hpp
+++ b/modules/gui/qt4/util/searchlineedit.hpp
@@ -58,14 +58,14 @@ class ClickLineEdit : public QLineEdit
Q_PROPERTY( QString clickMessage READ placeholderText WRITE setPlaceholderText )
public:
ClickLineEdit( const QString &msg, QWidget *parent );
- void setPlaceholderText( const QString &msg );
- const QString& placeholderText() const { return mClickMessage; }
- virtual void setText( const QString& txt );
+ void setPlaceholderText( const QString &msg ) Q_DECL_OVERRIDE;
+ const QString& placeholderText() const Q_DECLARE_OVERRIDE { return mClickMessage; }
+ void setText( const QString& txt ) Q_DECLARE_OVERRIDE;
protected:
- virtual void paintEvent( QPaintEvent *e );
- virtual void dropEvent( QDropEvent *ev );
- virtual void focusInEvent( QFocusEvent *ev );
- virtual void focusOutEvent( QFocusEvent *ev );
+ void paintEvent( QPaintEvent *e ) Q_DECL_OVERRIDE;
+ void dropEvent( QDropEvent *ev ) Q_DECL_OVERRIDE;
+ void focusInEvent( QFocusEvent *ev ) Q_DECL_OVERRIDE;
+ void focusOutEvent( QFocusEvent *ev ) Q_DECL_OVERRIDE;
private:
QString mClickMessage;
bool mDrawClickMsg;
@@ -112,7 +112,7 @@ public:
SearchLineEdit(QWidget *parent = 0);
virtual ~SearchLineEdit() {}
- virtual QSize sizeHint() const { return QSize(150, 40); }
+ QSize sizeHint() const Q_DECL_OVERRIDE { return QSize(150, 40); }
public slots:
void clear() {}
diff --git a/modules/gui/qt4/util/timetooltip.hpp b/modules/gui/qt4/util/timetooltip.hpp
index ea6535d..f938110 100644
--- a/modules/gui/qt4/util/timetooltip.hpp
+++ b/modules/gui/qt4/util/timetooltip.hpp
@@ -22,6 +22,8 @@
#ifndef TIMETOOLTIP_H
#define TIMETOOLTIP_H
+#include "qt4.hpp"
+
#include <QWidget>
#include <QBitmap>
@@ -40,7 +42,7 @@ public:
virtual void show();
protected:
- virtual void paintEvent( QPaintEvent * );
+ void paintEvent( QPaintEvent * ) Q_DECL_OVERRIDE;
private:
void adjustPosition();
diff --git a/modules/gui/qt4/util/validators.hpp b/modules/gui/qt4/util/validators.hpp
index 4a0cece..3f9d4e4 100644
--- a/modules/gui/qt4/util/validators.hpp
+++ b/modules/gui/qt4/util/validators.hpp
@@ -21,6 +21,8 @@
#ifndef VALIDATORS_HPP
#define VALIDATORS_HPP
+#include <qt4.hpp>
+
#include <QValidator>
class UrlValidator : public QValidator
@@ -28,8 +30,8 @@ class UrlValidator : public QValidator
Q_OBJECT
public:
UrlValidator( QObject *parent ) : QValidator( parent ) { }
- virtual QValidator::State validate( QString&, int& ) const;
- virtual void fixup ( QString & input ) const;
+ QValidator::State validate( QString&, int& ) const Q_DECL_OVERRIDE;
+ void fixup ( QString & input ) const Q_DECL_OVERRIDE;
};
#endif // VALIDATORS_HPP
--
1.8.3.2
More information about the vlc-devel
mailing list