[vlc-commits] qt4: Fix some missing "override" related warning

Hugo Beauzée-Luyssen git at videolan.org
Sun Nov 1 13:49:55 CET 2015


vlc | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Sun Nov  1 13:11:10 2015 +0100| [934d0965d549aca18f28df6f6814ec429b5917f8] | committer: Hugo Beauzée-Luyssen

qt4: Fix some missing "override" related warning

Also mark overriden function as virtual, for clarity.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=934d0965d549aca18f28df6f6814ec429b5917f8
---

 modules/gui/qt4/components/interface_widgets.hpp   |    2 +-
 modules/gui/qt4/components/open_panels.hpp         |    2 +-
 .../gui/qt4/components/playlist/playlist_model.hpp |   40 ++++++++++----------
 .../gui/qt4/components/playlist/standardpanel.hpp  |    2 +-
 modules/gui/qt4/components/preferences_widgets.hpp |    4 +-
 modules/gui/qt4/dialogs/help.hpp                   |    4 +-
 modules/gui/qt4/dialogs/openurl.hpp                |    2 +-
 modules/gui/qt4/dialogs/playlist.hpp               |    8 ++--
 8 files changed, 32 insertions(+), 32 deletions(-)

diff --git a/modules/gui/qt4/components/interface_widgets.hpp b/modules/gui/qt4/components/interface_widgets.hpp
index 437b17f..c1a8e3c 100644
--- a/modules/gui/qt4/components/interface_widgets.hpp
+++ b/modules/gui/qt4/components/interface_widgets.hpp
@@ -69,7 +69,7 @@ protected:
         return NULL;
     }
 
-    virtual void resizeEvent(QResizeEvent *);
+    virtual void resizeEvent(QResizeEvent *) Q_DECL_OVERRIDE;
 
 private:
     intf_thread_t *p_intf;
diff --git a/modules/gui/qt4/components/open_panels.hpp b/modules/gui/qt4/components/open_panels.hpp
index a3cd179..015c142 100644
--- a/modules/gui/qt4/components/open_panels.hpp
+++ b/modules/gui/qt4/components/open_panels.hpp
@@ -113,7 +113,7 @@ public:
     void clear() Q_DECL_OVERRIDE;
     virtual void accept() ;
 protected:
-    bool eventFilter(QObject *, QEvent *event)
+    bool eventFilter(QObject *, QEvent *event) Q_DECL_OVERRIDE
     {
         if( event->type() == QEvent::Hide ||
             event->type() == QEvent::HideToParent )
diff --git a/modules/gui/qt4/components/playlist/playlist_model.hpp b/modules/gui/qt4/components/playlist/playlist_model.hpp
index 4f3e9fa..96d3e6b 100644
--- a/modules/gui/qt4/components/playlist/playlist_model.hpp
+++ b/modules/gui/qt4/components/playlist/playlist_model.hpp
@@ -82,36 +82,36 @@ public:
     /* Drag and Drop */
     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 );
+    virtual bool dropMimeData( const QMimeData *data, Qt::DropAction action,
+              int row, int column, const QModelIndex &target ) Q_DECL_OVERRIDE;
     QStringList mimeTypes() const Q_DECL_OVERRIDE;
 
     /* Sort */
     void sort( const int column, Qt::SortOrder order = Qt::AscendingOrder ) Q_DECL_OVERRIDE;
 
     /*** VLCModelSubInterface subclassing ***/
-    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();
+    virtual void rebuild( playlist_item_t * p = NULL ) Q_DECL_OVERRIDE;
+    virtual void doDelete( QModelIndexList selected ) Q_DECL_OVERRIDE;
+    virtual void createNode( QModelIndex index, QString name ) Q_DECL_OVERRIDE;
+    virtual void renameNode( QModelIndex index, QString name ) Q_DECL_OVERRIDE;
+    virtual void removeAll() Q_DECL_OVERRIDE;
 
     /* Lookups */
-    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;
+    virtual QModelIndex rootIndex() const Q_DECL_OVERRIDE;
+    virtual void filter( const QString& search_text, const QModelIndex & root, bool b_recursive ) Q_DECL_OVERRIDE;
+    virtual QModelIndex currentIndex() const Q_DECL_OVERRIDE;
+    virtual QModelIndex indexByPLID( const int i_plid, const int c ) const Q_DECL_OVERRIDE;
+    virtual QModelIndex indexByInputItemID( const int i_inputitem_id, const int c ) const Q_DECL_OVERRIDE;
+    virtual bool isTree() const Q_DECL_OVERRIDE;
+    virtual bool canEdit() const Q_DECL_OVERRIDE;
+    virtual bool action( QAction *action, const QModelIndexList &indexes ) Q_DECL_OVERRIDE;
+    virtual bool isSupportedAction( actions action, const QModelIndex & ) const Q_DECL_OVERRIDE;
 
 protected:
     /* VLCModel subclassing */
-    bool isParent( const QModelIndex &index, const QModelIndex &current) const;
-    bool isLeaf( const QModelIndex &index ) const;
-    PLItem *getItem( const QModelIndex & index ) const;
+    virtual bool isParent( const QModelIndex &index, const QModelIndex &current) const Q_DECL_OVERRIDE;
+    virtual bool isLeaf( const QModelIndex &index ) const Q_DECL_OVERRIDE;
+    virtual PLItem *getItem( const QModelIndex & index ) const Q_DECL_OVERRIDE;
 
 private:
     /* General */
@@ -162,7 +162,7 @@ private slots:
     void processItemRemoval( int i_pl_itemid );
     void processItemAppend( int i_pl_itemid, int i_pl_itemidparent );
     void activateItem( playlist_item_t *p_item );
-    void activateItem( const QModelIndex &index );
+    virtual void activateItem( const QModelIndex &index ) Q_DECL_OVERRIDE;
 };
 
 class PlMimeData : public QMimeData
diff --git a/modules/gui/qt4/components/playlist/standardpanel.hpp b/modules/gui/qt4/components/playlist/standardpanel.hpp
index 4e0cc42..947da39 100644
--- a/modules/gui/qt4/components/playlist/standardpanel.hpp
+++ b/modules/gui/qt4/components/playlist/standardpanel.hpp
@@ -100,7 +100,7 @@ private:
     void createListView();
     void createCoverView();
     void updateZoom( int i_zoom );
-    bool eventFilter ( QObject * watched, QEvent * event );
+    virtual bool eventFilter ( QObject * watched, QEvent * event ) Q_DECL_OVERRIDE;
 
     /* Wait spinner */
     PixmapAnimator *spinnerAnimation;
diff --git a/modules/gui/qt4/components/preferences_widgets.hpp b/modules/gui/qt4/components/preferences_widgets.hpp
index dcbee20..ce671bb 100644
--- a/modules/gui/qt4/components/preferences_widgets.hpp
+++ b/modules/gui/qt4/components/preferences_widgets.hpp
@@ -116,8 +116,8 @@ class VIntConfigControl : public ConfigControl
 Q_OBJECT
 public:
     virtual int getValue() const = 0;
-    int getType() const Q_DECL_OVERRIDE;
-    virtual void doApply();
+    virtual int getType() const Q_DECL_OVERRIDE;
+    virtual void doApply() Q_DECL_OVERRIDE;
 protected:
     VIntConfigControl( vlc_object_t *a, module_config_t *b ) :
                 ConfigControl(a,b) {}
diff --git a/modules/gui/qt4/dialogs/help.hpp b/modules/gui/qt4/dialogs/help.hpp
index 79851bd..452cef4 100644
--- a/modules/gui/qt4/dialogs/help.hpp
+++ b/modules/gui/qt4/dialogs/help.hpp
@@ -61,8 +61,8 @@ public slots:
     friend class    Singleton<AboutDialog>;
 
 protected:
-    bool eventFilter(QObject *obj, QEvent *event);
-    void showEvent ( QShowEvent * ) Q_DECL_OVERRIDE;
+    virtual bool eventFilter(QObject *obj, QEvent *event) Q_DECL_OVERRIDE;
+    virtual void showEvent ( QShowEvent * ) Q_DECL_OVERRIDE;
 
 private:
     bool b_advanced;
diff --git a/modules/gui/qt4/dialogs/openurl.hpp b/modules/gui/qt4/dialogs/openurl.hpp
index 8522f93..2743f9f 100644
--- a/modules/gui/qt4/dialogs/openurl.hpp
+++ b/modules/gui/qt4/dialogs/openurl.hpp
@@ -53,7 +53,7 @@ public:
 
     QString url() const;
     bool shouldEnqueue() const;
-    void showEvent( QShowEvent *ev );
+    virtual void showEvent( QShowEvent *ev ) Q_DECL_OVERRIDE;
 
 public slots:
     void close() Q_DECL_OVERRIDE { play(); };
diff --git a/modules/gui/qt4/dialogs/playlist.hpp b/modules/gui/qt4/dialogs/playlist.hpp
index 56f5136..bf8f418 100644
--- a/modules/gui/qt4/dialogs/playlist.hpp
+++ b/modules/gui/qt4/dialogs/playlist.hpp
@@ -49,10 +49,10 @@ private:
     PlaylistDialog( intf_thread_t * );
     virtual ~PlaylistDialog();
 
-    void dropEvent( QDropEvent *);
-    void dragEnterEvent( QDragEnterEvent * );
-    void dragMoveEvent( QDragMoveEvent * );
-    void dragLeaveEvent( QDragLeaveEvent * );
+    virtual void dropEvent( QDropEvent *) Q_DECL_OVERRIDE;
+    virtual void dragEnterEvent( QDragEnterEvent * ) Q_DECL_OVERRIDE;
+    virtual void dragMoveEvent( QDragMoveEvent * ) Q_DECL_OVERRIDE;
+    virtual void dragLeaveEvent( QDragLeaveEvent * ) Q_DECL_OVERRIDE;
 
     friend class    Singleton<PlaylistDialog>;
 



More information about the vlc-commits mailing list