summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qstring.h
diff options
context:
space:
mode:
authorOlivier Goffart <ogoffart@trolltech.com>2010-02-19 12:39:56 (GMT)
committerOlivier Goffart <ogoffart@trolltech.com>2010-02-21 16:24:35 (GMT)
commit1f0e2e9825453fc0d8efa91b21afa8e8a9b4951f (patch)
tree10ee3abb0293842911f5da4a93a8d260e4e3c0c2 /src/corelib/tools/qstring.h
parent5d3eb7a1062744afad06882e9a8f59c84fd4e8b7 (diff)
downloadQt-1f0e2e9825453fc0d8efa91b21afa8e8a9b4951f.zip
Qt-1f0e2e9825453fc0d8efa91b21afa8e8a9b4951f.tar.gz
Qt-1f0e2e9825453fc0d8efa91b21afa8e8a9b4951f.tar.bz2
Enable QT_USE_FAST_CONCATENATION by default for compiling Qt
But disable it with GCC 4.0 as it is known to cause problems due to a compiler bug Reviewed-by: Joao Reviewed-by: hjk
Diffstat (limited to 'src/corelib/tools/qstring.h')
-rw-r--r--src/corelib/tools/qstring.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/corelib/tools/qstring.h b/src/corelib/tools/qstring.h
index 8de3c7d..a59c0bd 100644
--- a/src/corelib/tools/qstring.h
+++ b/src/corelib/tools/qstring.h
@@ -73,6 +73,16 @@ 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