]> git.sesse.net Git - vlc/commitdiff
qt4: Add a 'virtual vs Q_DECL_OVERRIDE' section
authorUwe L. Korn <uwelk@xhochy.com>
Fri, 15 Aug 2014 09:58:08 +0000 (09:58 +0000)
committerTristan Matthews <le.businessman@gmail.com>
Wed, 3 Sep 2014 01:23:09 +0000 (21:23 -0400)
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@gmail.com>
modules/gui/qt4/HACKING

index bb642caf3fc99a8cfcd70c5480a6a514c828347b..c58a476443cd39424dc103380ceb9a6fdb5caf8e 100644 (file)
@@ -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: