From 473e2d311ea8ec701e8c915f5c5d8b1f99209374 Mon Sep 17 00:00:00 2001 From: "Bradley T. Hughes" Date: Thu, 26 Apr 2012 14:31:40 +0200 Subject: Compile on Mac OS X with unsupported/macx-clang MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Clang does not allow implicit const to non-const conversion like gcc does. Fix this. Change-Id: I1448975e1935a54405c20851841f0559c7bb9d3d Reviewed-by: Tor Arne Vestbø --- src/gui/kernel/qt_cocoa_helpers_mac_p.h | 2 +- src/plugins/bearer/corewlan/qcorewlanengine.mm | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/kernel/qt_cocoa_helpers_mac_p.h b/src/gui/kernel/qt_cocoa_helpers_mac_p.h index d831e27..17f1769 100644 --- a/src/gui/kernel/qt_cocoa_helpers_mac_p.h +++ b/src/gui/kernel/qt_cocoa_helpers_mac_p.h @@ -215,7 +215,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]; } #ifdef QT_MAC_USE_COCOA class QCocoaPostMessageArgs { diff --git a/src/plugins/bearer/corewlan/qcorewlanengine.mm b/src/plugins/bearer/corewlan/qcorewlanengine.mm index 5552252..422c835 100644 --- a/src/plugins/bearer/corewlan/qcorewlanengine.mm +++ b/src/plugins/bearer/corewlan/qcorewlanengine.mm @@ -73,7 +73,7 @@ inline QString qt_NSStringToQString(const NSString *nsstr) { return QCFString::toQString(reinterpret_cast(nsstr)); } inline NSString *qt_QStringToNSString(const QString &qstr) -{ return [reinterpret_cast(QCFString::toCFStringRef(qstr)) autorelease]; } +{ return [const_cast(reinterpret_cast(QCFString::toCFStringRef(qstr))) autorelease]; } @interface QT_MANGLE_NAMESPACE(QNSListener) : NSObject -- cgit v0.12