summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Goffart <olivier.goffart@nokia.com>2011-04-13 09:33:22 (GMT)
committerOlivier Goffart <olivier.goffart@nokia.com>2011-04-13 09:33:22 (GMT)
commit2da25f1ab075c8fbaf7b82fb10b4868db30a7c18 (patch)
tree507f23405f1c77dee26118797393d95587b2f7ce
parentf62e846c7ebe243a2a36e7577d070f1275f2ec47 (diff)
downloadQt-2da25f1ab075c8fbaf7b82fb10b4868db30a7c18.zip
Qt-2da25f1ab075c8fbaf7b82fb10b4868db30a7c18.tar.gz
Qt-2da25f1ab075c8fbaf7b82fb10b4868db30a7c18.tar.bz2
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
-rw-r--r--src/corelib/tools/qbytearray.h11
-rw-r--r--src/corelib/tools/qstring.h10
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<wchar_t> 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