summaryrefslogtreecommitdiffstats
path: root/src/corelib
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2014-04-07 13:49:17 -0700
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-04-08 05:16:58 +0200
commitc33849d0cbfbe0c33170d8e3a49f89b22fd76246 (patch)
treec0db599013bfa89d02ed1a3d4bd79c9142100591 /src/corelib
parentb81898f1dba00974e4ff7a16c2cb9abe03d2211c (diff)
Don't redefine dynamic_cast if it's already a macro
Redefining macros is always a bad idea. On top of that, MSVC doesn't like when we #define dynamic_cast, even though the C++ standard explicitly allows it. Task-number: QTBUG-29093 Change-Id: I6e33d609ce213cf6a9085faa3f991a873d825dc6 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/global/qglobal.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h
index 9b5d78b6fe..fba8b019e7 100644
--- a/src/corelib/global/qglobal.h
+++ b/src/corelib/global/qglobal.h
@@ -980,7 +980,7 @@ Q_CORE_EXPORT QString qtTrId(const char *id, int n = -1);
dynamic_cast to cause a compile failure.
*/
-#ifdef QT_NO_DYNAMIC_CAST
+#if defined(QT_NO_DYNAMIC_CAST) && !defined(dynamic_cast)
# define dynamic_cast QT_PREPEND_NAMESPACE(qt_dynamic_cast_check)
template<typename T, typename X>