summaryrefslogtreecommitdiffstats
path: root/src
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
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')
-rw-r--r--src/corelib/tools/qstring.h10
-rw-r--r--src/qbase.pri1
2 files changed, 11 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
diff --git a/src/qbase.pri b/src/qbase.pri
index ef5d9e5..835ed0e 100644
--- a/src/qbase.pri
+++ b/src/qbase.pri
@@ -157,6 +157,7 @@ contains(QT_PRODUCT, OpenSource.*):DEFINES *= QT_OPENSOURCE
DEFINES *= QT_NO_CAST_TO_ASCII QT_ASCII_CAST_WARNINGS
contains(QT_CONFIG, qt3support):DEFINES *= QT3_SUPPORT
DEFINES *= QT_MOC_COMPAT #we don't need warnings from calling moc code in our generated code
+DEFINES *= QT_USE_FAST_OPERATOR_PLUS QT_USE_FAST_CONCATENATION
TARGET = $$qtLibraryTarget($$TARGET$$QT_LIBINFIX) #do this towards the end