- 
    
Bug
 - 
    Resolution: Done
 - 
    
P1: Critical
 - 
    4.8.5, 4.8.6
 - 
    None
 - 
    Qt 4.8.5, 4.8.6; Apple clang version 3.0 (tags/Apple/clang-211.10.1) (based on LLVM 3.0svn)
Target: x86_64-apple-darwin10.8.0
Thread model: posix - OS X 10.6.8
The same for Apple clang version 3.3 on OS X 10.8.4
 
- 
        b100e49d76232080d782bc7e1e77c29a30c9d710
 
Qt 4.8 (git) does not compile using Clang. Still QTBUG-21047....
When you try to build Qt 4.8, compilation of QtGui fails:
"kernel/qapplication_mac.mm:250:46: error: cannot initialize a parameter of type 'NSString *' with an rvalue of type 'const NSString *'
    NSURL *nibUrl = [NSURL fileURLWithPath : reinterpret_cast<const NSString *>(QCFString::toCFStringRef(nibDir))];
                                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/System/Library/Frameworks/Foundation.framework/Headers/NSURL.h:52:35: note: passing argument to parameter 'path' here
+ (id)fileURLWithPath:(NSString *)path; // Better to use fileURLWithPath:isDirectory: if you know if the path is a file vs directory, as it saves an i/o."
I see two solutions (file 'kernel/qapplication_mac.mm', line 250):
1. Old C-style cast to (NSSting *):
  NSURL *nibUrl = [NSURL fileURLWithPath : (NSString *) QCFString::toCFStringRef(nibDir)];
2. const_cast<NSString *>:
  NSURL *nibUrl = [NSURL fileURLWithPath : const_cast<NSString *>(reinterpret_cast<const NSString *>(QCFString::toCFStringRef(nibDir)))];
Both work using clang 3.0, clang 3.3, gcc version 4.2.1 ...
- replaces
 - 
                    
QTBUG-21047 Qt 4.8 (git) does not compile using Clang
-         
     - Closed
 
 -