summaryrefslogtreecommitdiffstats
path: root/src/corelib/global/qglobal.h
diff options
context:
space:
mode:
authorStephen Kelly <stephen.kelly@kdab.com>2012-01-08 19:58:43 +0100
committerQt by Nokia <qt-info@nokia.com>2012-01-10 16:11:50 +0100
commitc11cb16f3f4249347ea3db4e1586bc1dac3a7d39 (patch)
treee53d53d1d54e311586afdcc6ea19eb3607f8af06 /src/corelib/global/qglobal.h
parent20abd88e711a2dfcbe07925f8902faa45e5110e2 (diff)
Add defines for explicit virtual overrides.
Change-Id: Ia9a610e81eeaaa0a08ca6ef4945b002bdb13fe8a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Diffstat (limited to 'src/corelib/global/qglobal.h')
-rw-r--r--src/corelib/global/qglobal.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h
index 5e743b287d..1d924e840d 100644
--- a/src/corelib/global/qglobal.h
+++ b/src/corelib/global/qglobal.h
@@ -520,6 +520,11 @@ namespace QT_NAMESPACE {}
# define Q_COMPILER_UNRESTRICTED_UNIONS
# define Q_COMPILER_RANGE_FOR
# endif
+# if (__GNUC__ * 100 + __GNUC_MINOR__) >= 407
+ /* C++0x features supported in GCC 4.7: */
+# define Q_COMPILER_EXPLICIT_OVERRIDES
+# define Q_COMPILER_FINAL
+# endif
# endif
@@ -1083,6 +1088,18 @@ redefine to built-in booleans to make autotests work properly */
# define Q_DECL_CONSTEXPR
#endif
+#ifdef Q_COMPILER_EXPLICIT_OVERRIDES
+# define Q_DECL_OVERRIDE override
+#else
+# define Q_DECL_OVERRIDE
+#endif
+
+#ifdef Q_COMPILER_FINAL
+# define Q_DECL_FINAL final
+#else
+# define Q_DECL_FINAL
+#endif
+
//defines the type for the WNDPROC on windows
//the alignment needs to be forced for sse2 to not crash with mingw
#if defined(Q_OS_WIN)