[vlc-commits] qt4: Add a 'virtual vs Q_DECL_OVERRIDE' section

Uwe L. Korn git at videolan.org
Wed Sep 3 03:23:43 CEST 2014


vlc | branch: master | Uwe L. Korn <uwelk at xhochy.com> | Fri Aug 15 09:58:08 2014 +0000| [5ef7934b35e059752ab97162e33ba4ce8aaac71e] | committer: Tristan Matthews

qt4: Add a 'virtual vs Q_DECL_OVERRIDE' section

This should explain when to use the virtual keyword or the
Q_DECL_OVERRIDE macros on virtual function declarations.

Signed-off-by: Tristan Matthews <le.businessman at gmail.com>

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

 modules/gui/qt4/HACKING |    8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/modules/gui/qt4/HACKING b/modules/gui/qt4/HACKING
index bb642ca..c58a476 100644
--- a/modules/gui/qt4/HACKING
+++ b/modules/gui/qt4/HACKING
@@ -43,6 +43,14 @@ So if your dialog is a dialog you are used to keep during a playing of a video,
 QVLCFrame: extended panel, messages...
 QVLCDialog: preferences, open...
 
+** virtual vs Q_DECL_OVERRIDE **
+Only mark functions with the virtual keyword if this is the initial virtual
+declaration. Functions that override a virtual function should have the
+Q_DECL_OVERRIDE macro appended (which expands to the override identifier
+when compiled with Qt5 and C++11). This is a visual indicator to distinguish
+virtual declarations from overriding implementations and will include a
+compile-time check in C++11 language mode.
+
 ** HIG for Qt **
 We tend to use GNOME/KDE specs over Vista ones for capitalizations:
 We use Header for:



More information about the vlc-commits mailing list