From ac96f78398d96a3d2c9a1e67e1315e9d0f663ad6 Mon Sep 17 00:00:00 2001 From: "Bradley T. Hughes" Date: Thu, 27 Oct 2011 13:47:31 +0200 Subject: [PATCH] Compilation fix (cannot assign const pointer to non-const pointer) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit After reinterpret_casting to const NSString *, we need to const_cast to drop the cast to match the return type. Change-Id: I3d202aec10e719a48f29d96b81621492936ac6ad Reviewed-by: Morten Johan Sørvig --- src/widgets/platforms/mac/qt_cocoa_helpers_mac_p.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/widgets/platforms/mac/qt_cocoa_helpers_mac_p.h b/src/widgets/platforms/mac/qt_cocoa_helpers_mac_p.h index b46946c121..c85d39010c 100644 --- a/src/widgets/platforms/mac/qt_cocoa_helpers_mac_p.h +++ b/src/widgets/platforms/mac/qt_cocoa_helpers_mac_p.h @@ -214,7 +214,7 @@ inline QString qt_mac_NSStringToQString(const NSString *nsstr) { return QCFString::toQString(reinterpret_cast(nsstr)); } inline NSString *qt_mac_QStringToNSString(const QString &qstr) -{ return [reinterpret_cast(QCFString::toCFStringRef(qstr)) autorelease]; } +{ return [const_cast(reinterpret_cast(QCFString::toCFStringRef(qstr))) autorelease]; } #endif