diff options
author | Sami Lempinen <sami.lempinen@nokia.com> | 2011-04-28 08:10:57 (GMT) |
---|---|---|
committer | Sami Lempinen <sami.lempinen@nokia.com> | 2011-04-28 08:10:57 (GMT) |
commit | 95de3f34d9dba4cd95f1f3d32b35c4a4d97e70d9 (patch) | |
tree | 7be35a9028b5c83b792190fb954127e9f558baf5 /src/corelib/tools/qbytearray.h | |
parent | 9d6530b9774de482b0b3a29720f7f756e986f5c7 (diff) | |
parent | 8e615d9b07f6146b5cb6b56c4cd2e32376a8b429 (diff) | |
download | Qt-95de3f34d9dba4cd95f1f3d32b35c4a4d97e70d9.zip Qt-95de3f34d9dba4cd95f1f3d32b35c4a4d97e70d9.tar.gz Qt-95de3f34d9dba4cd95f1f3d32b35c4a4d97e70d9.tar.bz2 |
Merge remote-tracking branch 'qt/4.8'
Diffstat (limited to 'src/corelib/tools/qbytearray.h')
-rw-r--r-- | src/corelib/tools/qbytearray.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/corelib/tools/qbytearray.h b/src/corelib/tools/qbytearray.h index 70d865a..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 @@ -548,6 +559,8 @@ inline bool operator>=(const QByteArray &a1, const char *a2) { return qstrcmp(a1, a2) >= 0; } inline bool operator>=(const char *a1, const QByteArray &a2) { return qstrcmp(a1, a2) >= 0; } +#ifndef QT_USE_FAST_OPERATOR_PLUS +# ifndef QT_USE_FAST_CONCATENATION inline const QByteArray operator+(const QByteArray &a1, const QByteArray &a2) { return QByteArray(a1) += a2; } inline const QByteArray operator+(const QByteArray &a1, const char *a2) @@ -558,6 +571,8 @@ inline const QByteArray operator+(const char *a1, const QByteArray &a2) { return QByteArray(a1) += a2; } inline const QByteArray operator+(char a1, const QByteArray &a2) { return QByteArray(&a1, 1) += a2; } +# endif // QT_USE_FAST_CONCATENATION +#endif // QT_USE_FAST_OPERATOR_PLUS inline QBool QByteArray::contains(const char *c) const { return QBool(indexOf(c) != -1); } inline QByteArray &QByteArray::replace(char before, const char *c) @@ -600,4 +615,8 @@ QT_END_NAMESPACE QT_END_HEADER +#ifdef QT_USE_FAST_CONCATENATION +#include <QtCore/qstring.h> +#endif + #endif // QBYTEARRAY_H |