Fix tst_Moc::oldStyleCasts

This tests that the moc generated file produces no warnings with very
pedentic compilation flags.
In that case, there was a warning because of the use of the C casts

Change-Id: Ie79c6d053ff35c55276a07212c5d60f759f693ee
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
bb10
Olivier Goffart 2011-11-16 09:07:24 +01:00 committed by Qt by Nokia
parent 585b5e95e3
commit fc6ba401d2
1 changed files with 2 additions and 2 deletions

View File

@ -782,8 +782,8 @@ inline int QString::toWCharArray(wchar_t *array) const
}
inline QString QString::fromWCharArray(const wchar_t *string, int size)
{
return sizeof(wchar_t) == sizeof(QChar) ? fromUtf16((const ushort *)string, size)
: fromUcs4((uint *)string, size);
return sizeof(wchar_t) == sizeof(QChar) ? fromUtf16(reinterpret_cast<const ushort *>(string), size)
: fromUcs4(reinterpret_cast<const uint *>(string), size);
}