From 39f2dc87dbec95934cb4596c46f8b17994048de2 Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Fri, 5 Nov 2010 10:27:50 +0100 Subject: Do not define METHOD if QT_NO_KEYWORD is defined. METHOD is never used in Qt, and is conflicting with other libraries. Task-number: QTBUG-14514 Reviewed-by: Joao Reviewed-by: Brad --- src/corelib/kernel/qobjectdefs.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/corelib/kernel/qobjectdefs.h b/src/corelib/kernel/qobjectdefs.h index db46ba5..b4e4aa5 100644 --- a/src/corelib/kernel/qobjectdefs.h +++ b/src/corelib/kernel/qobjectdefs.h @@ -215,11 +215,15 @@ Q_CORE_EXPORT const char *qFlagLocation(const char *method); #define QTOSTRING(s) QTOSTRING_HELPER(s) #ifndef QT_NO_DEBUG # define QLOCATION "\0"__FILE__":"QTOSTRING(__LINE__) -# define METHOD(a) qFlagLocation("0"#a QLOCATION) +# ifndef QT_NO_KEYWORDS +# define METHOD(a) qFlagLocation("0"#a QLOCATION) +# endif # define SLOT(a) qFlagLocation("1"#a QLOCATION) # define SIGNAL(a) qFlagLocation("2"#a QLOCATION) #else -# define METHOD(a) "0"#a +# ifndef QT_NO_KEYWORDS +# define METHOD(a) "0"#a +# endif # define SLOT(a) "1"#a # define SIGNAL(a) "2"#a #endif -- cgit v0.12