Add operator<<(QTestData &, QStringBuilder)

So this code still compiles with QStringBuilder
QTest::newRow("foo") << foo + bar;

Change-Id: Ie82a21c8fd07ec2d27ad85015aa1a0c4e94700d6
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
This commit is contained in:
Olivier Goffart 2012-02-28 09:34:20 +01:00 committed by Qt by Nokia
parent 1ff1486d53
commit eb4828bbfd

View File

@ -89,6 +89,14 @@ inline QTestData &operator<<(QTestData &data, const char * value)
return data;
}
#ifdef QT_USE_QSTRINGBUILDER
template<typename A, typename B>
inline QTestData &operator<<(QTestData &data, const QStringBuilder<A, B> &value)
{
return data << typename QConcatenable<QStringBuilder<A, B> >::ConvertTo(value);
}
#endif
QT_END_NAMESPACE
QT_END_HEADER