#4343 qt4-base-mac-4.7.3-37 for building on future os

Added_to_Fink
closed-fixed
None
5
2013-10-29
2013-08-09
No

The attached qt4-base-mac-4.7.3-37 packaging adds additional fixes to qt4-base.patch to allow for compilation on future os. The PatchScript is also extended to force targeting of 10.7 on 10.9 as that is the minimal deployment target for libc++ support. The corewlan plugin is also disabled as the required calls are deprecated out of 10.9. The additional patch changes are...

--- qt-kde-qt-mac/src/gui/kernel/qt_cocoa_helpers_mac_p.h.orig  2013-08-08 08:57:56.000000000 -0400
+++ qt-kde-qt-mac/src/gui/kernel/qt_cocoa_helpers_mac_p.h   2013-08-08 08:58:30.000000000 -0400
@@ -109,6 +109,7 @@
 #include "private/qt_mac_p.h"

 struct HIContentBorderMetrics;
+struct TabletProximityRec;

 #ifdef Q_WS_MAC32
 typedef struct _NSPoint NSPoint; // Just redefine here so I don't have to pull in all of Cocoa.
@@ -158,7 +159,6 @@
 bool qt_mac_handleMouseEvent(void * /*QCocoaView * */view, void * /*NSEvent * */event, QEvent::Type eventType, Qt::MouseButton button);
 bool qt_mac_handleTabletEvent(void * /*QCocoaView * */view, void * /*NSEvent * */event);
 inline QApplication *qAppInstance() { return static_cast<QApplication *>(QCoreApplication::instance()); }
-struct ::TabletProximityRec;
 void qt_dispatchTabletProximityEvent(const ::TabletProximityRec &proxRec);
 Qt::KeyboardModifiers qt_cocoaModifiers2QtModifiers(ulong modifierFlags);
 Qt::KeyboardModifiers qt_cocoaDragOperation2QtModifiers(uint dragOperations);
--- qt-kde-qt-mac/src/gui/kernel/qt_cocoa_helpers_mac_p.h.orig  2013-08-08 09:18:02.000000000 -0400
+++ qt-kde-qt-mac/src/gui/kernel/qt_cocoa_helpers_mac_p.h   2013-08-08 09:18:54.000000000 -0400
@@ -195,7 +195,7 @@
 { return QCFString::toQString(reinterpret_cast<const CFStringRef>(nsstr)); }

 inline NSString *qt_mac_QStringToNSString(const QString &qstr)
-{ return [reinterpret_cast<const NSString *>(QCFString::toCFStringRef(qstr)) autorelease]; }
+{ return [const_cast<NSString *>(reinterpret_cast<const NSString *>(QCFString::toCFStringRef(qstr))) autorelease]; }

 #ifdef QT_MAC_USE_COCOA
 class QCocoaPostMessageArgs {
--- qt-kde-qt-mac/src/plugins/bearer/corewlan/qcorewlanengine.mm.orig   2013-08-08 09:19:11.000000000 -0400
+++ qt-kde-qt-mac/src/plugins/bearer/corewlan/qcorewlanengine.mm    2013-08-08 09:19:31.000000000 -0400
@@ -73,8 +73,7 @@
 { return QCFString::toQString(reinterpret_cast<const CFStringRef>(nsstr)); }

 inline NSString *qt_QStringToNSString(const QString &qstr)
-{ return [reinterpret_cast<const NSString *>(QCFString::toCFStringRef(qstr)) autorelease]; }
-
+{ return [const_cast<NSString *>(reinterpret_cast<const NSString *>(QCFString::toCFStringRef(qstr))) autorelease]; }

 @interface QT_MANGLE_NAMESPACE(QNSListener) : NSObject
 {
--- qt-kde-qt-mac/src/gui/kernel/qcocoamenuloader_mac.mm.orig   2013-08-08 09:40:04.000000000 -0400
+++ qt-kde-qt-mac/src/gui/kernel/qcocoamenuloader_mac.mm    2013-08-08 09:41:42.000000000 -0400
@@ -70,7 +70,7 @@
     showAllItem = [[appMenu itemWithTitle:@"Show All"] retain];

     // Get the names in the nib to match the app name set by Qt.
-    NSString *appName = reinterpret_cast<const NSString*>(QCFString::toCFStringRef(qAppName()));
+    NSString *appName = const_cast<NSString *>(reinterpret_cast<const NSString*>(QCFString::toCFStringRef(qAppName())));
     [quitItem setTitle:[[quitItem title] stringByReplacingOccurrencesOfString:@"NewApplication"
                                                                    withString:appName]];
     [hideItem setTitle:[[hideItem title] stringByReplacingOccurrencesOfString:@"NewApplication"
--- qt-kde-qt-mac/src/gui/kernel/qwidget_mac.mm.orig    2013-08-08 09:54:44.000000000 -0400
+++ qt-kde-qt-mac/src/gui/kernel/qwidget_mac.mm 2013-08-08 10:02:23.000000000 -0400
@@ -3206,7 +3206,7 @@
         if (iconButton == nil) {
             QCFString string(q->windowTitle());
             const NSString *tmpString = reinterpret_cast<const NSString *>((CFStringRef)string);
-            [qt_mac_window_for(q) setRepresentedURL:[NSURL fileURLWithPath:tmpString]];
+            [qt_mac_window_for(q) setRepresentedURL:[NSURL fileURLWithPath:const_cast<NSString *>(tmpString)]];
             iconButton = [qt_mac_window_for(q) standardWindowButton:NSWindowDocumentIconButton];
         }
         if (icon.isNull()) {
--- qt-kde-qt-mac/src/gui/kernel/qcocoaview_mac.mm.orig 2013-08-08 10:01:20.000000000 -0400
+++ qt-kde-qt-mac/src/gui/kernel/qcocoaview_mac.mm  2013-08-08 10:03:58.000000000 -0400
@@ -1383,7 +1383,7 @@
     if (!selectedText.isEmpty()) {
         QCFString string(selectedText.mid(theRange.location, theRange.length));
         const NSString *tmpString = reinterpret_cast<const NSString *>((CFStringRef)string);
-        return [[[NSAttributedString alloc]  initWithString:tmpString] autorelease];
+        return [[[NSAttributedString alloc]  initWithString:const_cast<NSString *>(tmpString)] autorelease];
     } else {
         return nil;
     }
--- qt-kde-qt-mac/src/gui/kernel/qt_cocoa_helpers_mac.mm.orig   2013-08-08 10:05:38.000000000 -0400
+++ qt-kde-qt-mac/src/gui/kernel/qt_cocoa_helpers_mac.mm    2013-08-08 10:06:23.000000000 -0400
@@ -1333,7 +1333,7 @@
     if (PasteboardCopyName (paste, &pbname)) {
         pb = [NSPasteboard generalPasteboard];
     } else {
-        pb = [NSPasteboard pasteboardWithName:reinterpret_cast<const NSString *>(pbname)];
+        pb = [NSPasteboard pasteboardWithName:const_cast<NSString *>(reinterpret_cast<const NSString *>(pbname))];
         CFRelease (pbname);
     }
     if (pb) {
--- qt-kde-qt-mac/src/gui/dialogs/qfontdialog_mac.mm.orig   2013-08-08 10:08:35.000000000 -0400
+++ qt-kde-qt-mac/src/gui/dialogs/qfontdialog_mac.mm    2013-08-08 10:12:54.000000000 -0400
@@ -509,7 +509,7 @@

 #if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
     if (qstrcmp(fe->name(), "CoreText") == 0) {
-        nsFont = reinterpret_cast<const NSFont *>(static_cast<QCoreTextFontEngineMulti *>(fe)->ctfont);
+        nsFont = const_cast<NSFont *>(reinterpret_cast<const NSFont *>(static_cast<QCoreTextFontEngineMulti *>(fe)->ctfont));
     } else
 #endif
     {

Discussion

  • Jack Howarth

    Jack Howarth - 2013-08-09

    Info file for qt4-base-mac-4.7.3-37

     
  • Jack Howarth

    Jack Howarth - 2013-08-09

    Patch file for qt4-base-mac-4.7.3-37

     
  • Hanspeter Niederstrasser

    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -1,5 +1,6 @@
     The attached qt4-base-mac-4.7.3-37 packaging adds additional fixes to qt4-base.patch to allow  for compilation on future os. The PatchScript is also extended to force targeting of 10.7 on 10.9 as that is the minimal deployment target for libc++ support. The corewlan plugin is also disabled as the required calls are deprecated out of 10.9. The additional patch changes are...
    
    +~~~~~patch
     --- qt-kde-qt-mac/src/gui/kernel/qt_cocoa_helpers_mac_p.h.orig 2013-08-08 08:57:56.000000000 -0400
     +++ qt-kde-qt-mac/src/gui/kernel/qt_cocoa_helpers_mac_p.h  2013-08-08 08:58:30.000000000 -0400
     @@ -109,6 +109,7 @@
    @@ -96,3 +97,4 @@
          } else
      #endif
          {
    +~~~~~
    
     
  • Hanspeter Niederstrasser

    In 10.7 CVS.

     
  • Hanspeter Niederstrasser

    • status: open --> closed-fixed
    • Group: Undergoing_Validation --> Added_to_Fink
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks