diff -Nurd qt-kde-qt-mac.orig/mkspecs/darwin-g++/qmake.conf qt-kde-qt-mac/mkspecs/darwin-g++/qmake.conf --- qt-kde-qt-mac.orig/mkspecs/darwin-g++/qmake.conf 2011-05-11 18:56:17.000000000 -0400 +++ qt-kde-qt-mac/mkspecs/darwin-g++/qmake.conf 2014-08-21 03:55:39.000000000 -0400 @@ -69,7 +68,6 @@ QMAKE_LFLAGS_COMPAT_VERSION = -compatibility_version$${LITERAL_WHITESPACE} QMAKE_LFLAGS_RPATH = -QMAKE_RPATH = QMAKE_FIX_RPATH = install_name_tool -id QMAKE_LIBS_DYNLOAD = diff -Nurd qt-kde-qt-mac.orig/src/3rdparty/clucene/src/CLucene/StdHeader.h qt-kde-qt-mac/src/3rdparty/clucene/src/CLucene/StdHeader.h --- qt-kde-qt-mac.orig/src/3rdparty/clucene/src/CLucene/StdHeader.h 2010-12-27 15:08:05.000000000 -0500 +++ qt-kde-qt-mac/src/3rdparty/clucene/src/CLucene/StdHeader.h 2014-08-21 03:55:39.000000000 -0400 @@ -463,8 +463,16 @@ //use std namespace #ifndef LUCENE_NO_STDC_NAMESPACE +#ifdef _LIBCPP_VERSION +// clang's libc++ pulls in cwchar, clucene pulls in wchar.h and the entire std +// namespace which causes ambiguity between ::wcschar() and std::wcschar(), but +// clucene is only using std::min() and std::max() +using std::min; +using std::max; +#else using namespace std; #endif +#endif //////////////////////////////////////////////////////// diff -Nurd qt-kde-qt-mac.orig/src/3rdparty/javascriptcore/JavaScriptCore/runtime/Collector.cpp qt-kde-qt-mac/src/3rdparty/javascriptcore/JavaScriptCore/runtime/Collector.cpp --- qt-kde-qt-mac.orig/src/3rdparty/javascriptcore/JavaScriptCore/runtime/Collector.cpp 2011-05-08 23:25:04.000000000 -0400 +++ qt-kde-qt-mac/src/3rdparty/javascriptcore/JavaScriptCore/runtime/Collector.cpp 2014-08-21 03:55:39.000000000 -0400 @@ -52,6 +52,8 @@ #include #include #include +// clang's libc++ headers does not pull in pthread.h (but libstdc++ does) +#include #elif OS(WINDOWS) diff -Nurd qt-kde-qt-mac.orig/src/3rdparty/javascriptcore/JavaScriptCore/wtf/HashTable.h qt-kde-qt-mac/src/3rdparty/javascriptcore/JavaScriptCore/wtf/HashTable.h --- qt-kde-qt-mac.orig/src/3rdparty/javascriptcore/JavaScriptCore/wtf/HashTable.h 2010-12-27 15:11:05.000000000 -0500 +++ qt-kde-qt-mac/src/3rdparty/javascriptcore/JavaScriptCore/wtf/HashTable.h 2014-08-21 03:55:39.000000000 -0400 @@ -257,8 +257,8 @@ using std::swap; -#if !COMPILER(MSVC) - // Visual C++ has a swap for pairs defined. +#if !COMPILER(MSVC) && !OS(QNX) && !defined(_LIBCPP_VERSION) + // The Dinkumware C++ library (used by MSVC and QNX) and clang's libc++ have a swap for pairs defined. // swap pairs by component, in case of pair members that specialize swap template inline void swap(pair& a, pair& b) diff -Nurd qt-kde-qt-mac.orig/src/corelib/global/qglobal.h qt-kde-qt-mac/src/corelib/global/qglobal.h --- qt-kde-qt-mac.orig/src/corelib/global/qglobal.h 2011-05-11 18:56:16.000000000 -0400 +++ qt-kde-qt-mac/src/corelib/global/qglobal.h 2014-08-21 03:57:07.000000000 -0400 @@ -320,7 +320,9 @@ # define MAC_OS_X_VERSION_10_6 MAC_OS_X_VERSION_10_5 + 1 # endif # if (MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_6) + /* omitting this noise for fink... # warning "This version of Mac OS X is unsupported" + */ # endif #endif diff -Nurd qt-kde-qt-mac.orig/src/corelib/kernel/qcore_unix.cpp qt-kde-qt-mac/src/corelib/kernel/qcore_unix.cpp --- qt-kde-qt-mac.orig/src/corelib/kernel/qcore_unix.cpp 2011-05-08 23:25:04.000000000 -0400 +++ qt-kde-qt-mac/src/corelib/kernel/qcore_unix.cpp 2014-08-21 03:55:39.000000000 -0400 @@ -58,12 +58,9 @@ static inline bool time_update(struct timeval *tv, const struct timeval &start, const struct timeval &timeout) { - if (!QElapsedTimer::isMonotonic()) { - // we cannot recalculate the timeout without a monotonic clock as the time may have changed - return false; - } - - // clock source is monotonic, so we can recalculate how much timeout is left + // We don't check for a monotonic clock, because on systems without + // one, that would make qt_safe_select() return 0 to fake a timeout + // on EINTR. struct timeval now = qt_gettime(); *tv = timeout + start - now; return tv->tv_sec >= 0; diff -Nurd qt-kde-qt-mac.orig/src/corelib/tools/qiterator.h qt-kde-qt-mac/src/corelib/tools/qiterator.h --- qt-kde-qt-mac.orig/src/corelib/tools/qiterator.h 2011-05-08 23:25:04.000000000 -0400 +++ qt-kde-qt-mac/src/corelib/tools/qiterator.h 2014-08-21 03:55:39.000000000 -0400 @@ -42,15 +42,11 @@ #ifndef QITERATOR_H #define QITERATOR_H +#include #include QT_BEGIN_HEADER -namespace std { - struct bidirectional_iterator_tag; - struct random_access_iterator_tag; -} - QT_BEGIN_NAMESPACE QT_MODULE(Core) diff -Nurd qt-kde-qt-mac.orig/src/declarative/util/qdeclarativefontloader.cpp qt-kde-qt-mac/src/declarative/util/qdeclarativefontloader.cpp --- qt-kde-qt-mac.orig/src/declarative/util/qdeclarativefontloader.cpp 2011-05-08 23:25:04.000000000 -0400 +++ qt-kde-qt-mac/src/declarative/util/qdeclarativefontloader.cpp 2014-08-21 03:55:39.000000000 -0400 @@ -64,7 +64,7 @@ Q_OBJECT public: - QDeclarativeFontObject(int _id); + QDeclarativeFontObject(int _id = -1); void download(const QUrl &url, QNetworkAccessManager *manager); @@ -84,7 +84,7 @@ Q_DISABLE_COPY(QDeclarativeFontObject) }; -QDeclarativeFontObject::QDeclarativeFontObject(int _id = -1) +QDeclarativeFontObject::QDeclarativeFontObject(int _id) : QObject(0), id(_id), reply(0), redirectCount(0) {} diff -Nurd qt-kde-qt-mac.orig/src/gui/dialogs/qfontdialog_mac.mm qt-kde-qt-mac/src/gui/dialogs/qfontdialog_mac.mm --- qt-kde-qt-mac.orig/src/gui/dialogs/qfontdialog_mac.mm 2011-05-08 23:25:04.000000000 -0400 +++ qt-kde-qt-mac/src/gui/dialogs/qfontdialog_mac.mm 2014-08-21 03:55:39.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(static_cast(fe)->ctfont); + nsFont = const_cast(reinterpret_cast(static_cast(fe)->ctfont)); } else #endif { diff -Nurd qt-kde-qt-mac.orig/src/gui/kernel/qcocoamenuloader_mac.mm qt-kde-qt-mac/src/gui/kernel/qcocoamenuloader_mac.mm --- qt-kde-qt-mac.orig/src/gui/kernel/qcocoamenuloader_mac.mm 2011-05-08 23:25:04.000000000 -0400 +++ qt-kde-qt-mac/src/gui/kernel/qcocoamenuloader_mac.mm 2014-08-21 03:55:39.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(QCFString::toCFStringRef(qAppName())); + NSString *appName = const_cast(reinterpret_cast(QCFString::toCFStringRef(qAppName()))); [quitItem setTitle:[[quitItem title] stringByReplacingOccurrencesOfString:@"NewApplication" withString:appName]]; [hideItem setTitle:[[hideItem title] stringByReplacingOccurrencesOfString:@"NewApplication" diff -Nurd qt-kde-qt-mac.orig/src/gui/kernel/qcocoasharedwindowmethods_mac_p.h qt-kde-qt-mac/src/gui/kernel/qcocoasharedwindowmethods_mac_p.h --- qt-kde-qt-mac.orig/src/gui/kernel/qcocoasharedwindowmethods_mac_p.h 2011-05-08 23:25:04.000000000 -0400 +++ qt-kde-qt-mac/src/gui/kernel/qcocoasharedwindowmethods_mac_p.h 2014-08-21 03:55:39.000000000 -0400 @@ -309,7 +309,7 @@ QWidget *target = [self dragTargetHitTest:sender]; if (!target) - return [super draggingEntered:sender]; + return NSDragOperationNone; if (target->testAttribute(Qt::WA_DropSiteRegistered) == false) return NSDragOperationNone; @@ -321,7 +321,7 @@ { QWidget *target = [self dragTargetHitTest:sender]; if (!target) - return [super draggingUpdated:sender]; + return NSDragOperationNone; if (target == *currentDragTarget()) { // The drag continues to move over the widget that we have sendt @@ -345,7 +345,7 @@ { QWidget *target = [self dragTargetHitTest:sender]; if (!target) - return [super draggingExited:sender]; + return; if (*currentDragTarget()) { [reinterpret_cast((*currentDragTarget())->winId()) draggingExited:sender]; @@ -357,7 +357,7 @@ { QWidget *target = [self dragTargetHitTest:sender]; if (!target) - return [super performDragOperation:sender]; + return NO; BOOL dropResult = NO; if (*currentDragTarget()) { diff -Nurd qt-kde-qt-mac.orig/src/gui/kernel/qcocoaview_mac.mm qt-kde-qt-mac/src/gui/kernel/qcocoaview_mac.mm --- qt-kde-qt-mac.orig/src/gui/kernel/qcocoaview_mac.mm 2011-05-08 23:25:04.000000000 -0400 +++ qt-kde-qt-mac/src/gui/kernel/qcocoaview_mac.mm 2014-08-21 03:55:39.000000000 -0400 @@ -1383,7 +1383,7 @@ if (!selectedText.isEmpty()) { QCFString string(selectedText.mid(theRange.location, theRange.length)); const NSString *tmpString = reinterpret_cast((CFStringRef)string); - return [[[NSAttributedString alloc] initWithString:tmpString] autorelease]; + return [[[NSAttributedString alloc] initWithString:const_cast(tmpString)] autorelease]; } else { return nil; } diff -Nurd qt-kde-qt-mac.orig/src/gui/kernel/qt_cocoa_helpers_mac.mm qt-kde-qt-mac/src/gui/kernel/qt_cocoa_helpers_mac.mm --- qt-kde-qt-mac.orig/src/gui/kernel/qt_cocoa_helpers_mac.mm 2011-05-08 23:25:05.000000000 -0400 +++ qt-kde-qt-mac/src/gui/kernel/qt_cocoa_helpers_mac.mm 2014-08-21 03:55:39.000000000 -0400 @@ -1333,7 +1333,7 @@ if (PasteboardCopyName (paste, &pbname)) { pb = [NSPasteboard generalPasteboard]; } else { - pb = [NSPasteboard pasteboardWithName:reinterpret_cast(pbname)]; + pb = [NSPasteboard pasteboardWithName:const_cast(reinterpret_cast(pbname))]; CFRelease (pbname); } if (pb) { diff -Nurd qt-kde-qt-mac.orig/src/gui/kernel/qt_cocoa_helpers_mac_p.h qt-kde-qt-mac/src/gui/kernel/qt_cocoa_helpers_mac_p.h --- qt-kde-qt-mac.orig/src/gui/kernel/qt_cocoa_helpers_mac_p.h 2011-05-08 23:25:05.000000000 -0400 +++ qt-kde-qt-mac/src/gui/kernel/qt_cocoa_helpers_mac_p.h 2014-08-21 03:55:39.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(QCoreApplication::instance()); } -struct ::TabletProximityRec; void qt_dispatchTabletProximityEvent(const ::TabletProximityRec &proxRec); Qt::KeyboardModifiers qt_cocoaModifiers2QtModifiers(ulong modifierFlags); Qt::KeyboardModifiers qt_cocoaDragOperation2QtModifiers(uint dragOperations); @@ -195,7 +195,7 @@ { 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 -Nurd qt-kde-qt-mac.orig/src/gui/kernel/qwidget_mac.mm qt-kde-qt-mac/src/gui/kernel/qwidget_mac.mm --- qt-kde-qt-mac.orig/src/gui/kernel/qwidget_mac.mm 2011-05-08 23:25:05.000000000 -0400 +++ qt-kde-qt-mac/src/gui/kernel/qwidget_mac.mm 2014-08-21 03:55:39.000000000 -0400 @@ -3206,7 +3206,7 @@ if (iconButton == nil) { QCFString string(q->windowTitle()); const NSString *tmpString = reinterpret_cast((CFStringRef)string); - [qt_mac_window_for(q) setRepresentedURL:[NSURL fileURLWithPath:tmpString]]; + [qt_mac_window_for(q) setRepresentedURL:[NSURL fileURLWithPath:const_cast(tmpString)]]; iconButton = [qt_mac_window_for(q) standardWindowButton:NSWindowDocumentIconButton]; } if (icon.isNull()) { diff -Nurd qt-kde-qt-mac.orig/src/plugins/bearer/corewlan/qcorewlanengine.mm qt-kde-qt-mac/src/plugins/bearer/corewlan/qcorewlanengine.mm --- qt-kde-qt-mac.orig/src/plugins/bearer/corewlan/qcorewlanengine.mm 2011-05-08 23:25:05.000000000 -0400 +++ qt-kde-qt-mac/src/plugins/bearer/corewlan/qcorewlanengine.mm 2014-08-21 03:55:39.000000000 -0400 @@ -73,7 +73,7 @@ { 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 @@ -864,7 +864,7 @@ return getBytes(interfaceStr,true); } -quint64 QCoreWlanEngine::startTime(const QString &id) +quint64 QCoreWlanEngine::startTime(const QString &identifier) { QMutexLocker locker(&mutex); NSAutoreleasePool *autoreleasepool = [[NSAutoreleasePool alloc] init]; @@ -899,7 +899,7 @@ for(int i = 0; i < dictSize; i++) { if([ssidStr isEqualToString:keys[i]]) { const QString ident = QString::number(qHash(QLatin1String("corewlan:") + qt_NSStringToQString(objects[i]))); - if(ident == id) { + if(ident == identifier) { ok = true; } } @@ -944,3 +944,4 @@ } QT_END_NAMESPACE + diff -Nurd qt-kde-qt-mac.orig/tools/assistant/tools/assistant/assistant.pro qt-kde-qt-mac/tools/assistant/tools/assistant/assistant.pro --- qt-kde-qt-mac.orig/tools/assistant/tools/assistant/assistant.pro 2010-12-27 15:21:54.000000000 -0500 +++ qt-kde-qt-mac/tools/assistant/tools/assistant/assistant.pro 2014-08-21 03:55:39.000000000 -0400 @@ -13,6 +13,11 @@ INSTALLS += target DEPENDPATH += ../shared +# work around lack of indirect symbols in 10.4 +qclucene = QtCLucene$${QT_LIBINFIX} +linux-lsb-g++:LIBS_PRIVATE += --lsb-shared-libs=$$qclucene +LIBS_PRIVATE += -l$$qclucene + # ## Work around a qmake issue when statically linking to # ## not-yet-installed plugins QMAKE_LIBDIR += $$QT_BUILD_TREE/plugins/sqldrivers diff -Nurd qt-kde-qt-mac.orig/tools/assistant/tools/qcollectiongenerator/qcollectiongenerator.pro qt-kde-qt-mac/tools/assistant/tools/qcollectiongenerator/qcollectiongenerator.pro --- qt-kde-qt-mac.orig/tools/assistant/tools/qcollectiongenerator/qcollectiongenerator.pro 2010-12-27 15:11:11.000000000 -0500 +++ qt-kde-qt-mac/tools/assistant/tools/qcollectiongenerator/qcollectiongenerator.pro 2014-08-21 03:55:39.000000000 -0400 @@ -8,6 +8,12 @@ help \ console CONFIG -= app_bundle + +# work around lack of indirect symbols in 10.4 +qclucene = QtCLucene$${QT_LIBINFIX} +linux-lsb-g++:LIBS_PRIVATE += --lsb-shared-libs=$$qclucene +LIBS_PRIVATE += -l$$qclucene + target.path = $$[QT_INSTALL_BINS] INSTALLS += target SOURCES += ../shared/helpgenerator.cpp \ diff -Nurd qt-kde-qt-mac.orig/tools/assistant/tools/qhelpgenerator/qhelpgenerator.pro qt-kde-qt-mac/tools/assistant/tools/qhelpgenerator/qhelpgenerator.pro --- qt-kde-qt-mac.orig/tools/assistant/tools/qhelpgenerator/qhelpgenerator.pro 2010-12-27 15:08:46.000000000 -0500 +++ qt-kde-qt-mac/tools/assistant/tools/qhelpgenerator/qhelpgenerator.pro 2014-08-21 03:55:39.000000000 -0400 @@ -5,6 +5,11 @@ CONFIG -= app_bundle QT += network +# work around lack of indirect symbols in 10.4 +qclucene = QtCLucene$${QT_LIBINFIX} +linux-lsb-g++:LIBS_PRIVATE += --lsb-shared-libs=$$qclucene +LIBS_PRIVATE += -l$$qclucene + target.path=$$[QT_INSTALL_BINS] INSTALLS += target