Fix a "warning: 'operator+=' is deprecated" when building with clang
Any file including qstringbuilder.h would trigger a warning when compiled with QT_ASCII_CAST_WARNINGS defined since it implicitely converts a QString to QByteArray. Explicitely call toUtf8() to fix the issue. Change-Id: If20f9d4571c5d1ed789564196c9f1331e1efd1d9 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
parent
e3b7c23ec7
commit
191c0e300b
@ -403,8 +403,7 @@ QByteArray &appendToByteArray(QByteArray &a, const QStringBuilder<A, B> &b, char
|
||||
template <typename A, typename B>
|
||||
QByteArray &appendToByteArray(QByteArray &a, const QStringBuilder<A, B> &b, QChar)
|
||||
{
|
||||
// append UTF-16 data to the byte array
|
||||
return a += QString(b);
|
||||
return a += QString(b).toUtf8();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user