diff options
author | hjk <qtc-committer@nokia.com> | 2009-06-05 09:39:54 (GMT) |
---|---|---|
committer | hjk <qtc-committer@nokia.com> | 2009-06-05 11:15:39 (GMT) |
commit | e6b3c48159f479d82740988a6104b9f5aee16a59 (patch) | |
tree | 344cb7b264cec741bf67064ee38cc9479746ed74 /tests | |
parent | 84f381b98a9a100007a9d40a26e30f0bf705037b (diff) | |
download | Qt-e6b3c48159f479d82740988a6104b9f5aee16a59.zip Qt-e6b3c48159f479d82740988a6104b9f5aee16a59.tar.gz Qt-e6b3c48159f479d82740988a6104b9f5aee16a59.tar.bz2 |
Make QStringBuilder work out-of-the-box if QT_NO_CAST_FROM_ASCII is defined
So far, only operator% was working for concatenation in those circumnstances.
Now, defining QT_USE_FAST_OPERATOR_PLUS and QT_USE_FAST_CONCATENATION is
enough, so user code will work without any source changes.
Reviewed-by: joao
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/qstringbuilder/tst_qstringbuilder.cpp | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/tests/auto/qstringbuilder/tst_qstringbuilder.cpp b/tests/auto/qstringbuilder/tst_qstringbuilder.cpp index f5df79e..5501204 100644 --- a/tests/auto/qstringbuilder/tst_qstringbuilder.cpp +++ b/tests/auto/qstringbuilder/tst_qstringbuilder.cpp @@ -95,41 +95,6 @@ #define LITERAL "some literal" -#ifndef QT_NO_CAST_FROM_ASCII - -// Plan is to move the QConcatenable specialications below -// to qstringbuilder.h as soon as the QByteArray builder is -// implemented. - -QT_BEGIN_NAMESPACE - -template <int N> struct QConcatenable<char[N]> -{ - typedef char type[N]; - static int size(const char *) { return N - 1; } - static inline void appendTo(const type &a, QChar *&out) - { - memcpy(out, a, N - 1); - out += N - 1; - } -}; - -template <int N> struct QConcatenable<const char[N]> -{ - typedef char type[N]; - static int size(const char *) { return N - 1; } - static inline void appendTo(const type &a, QChar *&out) - { - memcpy(out, a, N - 1); - out += N - 1; - } -}; - -QT_END_NAMESPACE - -#endif - - class tst_QStringBuilder : public QObject { Q_OBJECT |