From c33849d0cbfbe0c33170d8e3a49f89b22fd76246 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Mon, 7 Apr 2014 13:49:17 -0700 Subject: 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 --- src/corelib/global/qglobal.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') 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 -- cgit v1.2.3