From fc6ba401d204c67b707ba8b8bd74c9e958454866 Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Wed, 16 Nov 2011 09:07:24 +0100 Subject: [PATCH] Fix tst_Moc::oldStyleCasts MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 --- src/corelib/tools/qstring.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/corelib/tools/qstring.h b/src/corelib/tools/qstring.h index 0688b98..4e1e67b 100644 --- a/src/corelib/tools/qstring.h +++ b/src/corelib/tools/qstring.h @@ -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(string), size) + : fromUcs4(reinterpret_cast(string), size); } -- 2.7.4