From 2da25f1ab075c8fbaf7b82fb10b4868db30a7c18 Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Wed, 13 Apr 2011 11:33:22 +0200 Subject: Compile on Mac. Move the work around for old gcc from qstring.h to qbytearray.h Since QByteArray now also use the FAST_OPERATOR_PLUS, it also need to be undefined there. and since qstring.h includes qbytearray.h, it should be placed into qbytearray.h --- src/corelib/tools/qbytearray.h | 11 +++++++++++ src/corelib/tools/qstring.h | 10 ---------- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/src/corelib/tools/qbytearray.h b/src/corelib/tools/qbytearray.h index 6957022..0627b4e 100644 --- a/src/corelib/tools/qbytearray.h +++ b/src/corelib/tools/qbytearray.h @@ -52,6 +52,17 @@ #error qbytearray.h must be included before any header file that defines truncate #endif +#if defined(Q_CC_GNU) && (__GNUC__ == 4 && __GNUC_MINOR__ == 0) +//There is a bug in GCC 4.0 that tries to instantiate template of annonymous enum +# ifdef QT_USE_FAST_OPERATOR_PLUS +# undef QT_USE_FAST_OPERATOR_PLUS +# endif +# ifdef QT_USE_FAST_CONCATENATION +# undef QT_USE_FAST_CONCATENATION +# endif +#endif + + QT_BEGIN_HEADER QT_BEGIN_NAMESPACE diff --git a/src/corelib/tools/qstring.h b/src/corelib/tools/qstring.h index 002e516..66cfa74 100644 --- a/src/corelib/tools/qstring.h +++ b/src/corelib/tools/qstring.h @@ -66,16 +66,6 @@ typedef std::basic_string QStdWString; #error qstring.h must be included before any header file that defines truncate #endif -#if defined(Q_CC_GNU) && (__GNUC__ == 4 && __GNUC_MINOR__ == 0) -//There is a bug in GCC 4.0 that tries to instantiate template of annonymous enum -# ifdef QT_USE_FAST_OPERATOR_PLUS -# undef QT_USE_FAST_OPERATOR_PLUS -# endif -# ifdef QT_USE_FAST_CONCATENATION -# undef QT_USE_FAST_CONCATENATION -# endif -#endif - QT_BEGIN_HEADER QT_BEGIN_NAMESPACE -- cgit v0.12