diff options
-rw-r--r-- | mkspecs/features/mac/default_post.prf | 15 | ||||
-rw-r--r-- | src/corelib/codecs/qiconvcodec.cpp | 2 | ||||
-rw-r--r-- | src/gui/kernel/qcocoamenuloader_mac.mm | 2 | ||||
-rw-r--r-- | src/gui/kernel/qwidget_mac.mm | 7 |
4 files changed, 23 insertions, 3 deletions
diff --git a/mkspecs/features/mac/default_post.prf b/mkspecs/features/mac/default_post.prf index ea9e9bd..4999762 100644 --- a/mkspecs/features/mac/default_post.prf +++ b/mkspecs/features/mac/default_post.prf @@ -1,2 +1,17 @@ load(default_post) !no_objective_c:CONFIG += objective_c + +# Pick a suitable default architecture for qmake-based applications. +# If the Qt package contains one of x86 and x86_64, pick that one. If it +# contains both then use the compiler default. Make a similiar decision for +# PowerPC-based systems. Note that this logic assumes that Qt has been +# configured with an architecture that is usable on the system. +qt:!isEmpty(QT_CONFIG) { + contains(QMAKE_HOST.arch, ppc) { + !contains(QT_CONFIG, ppc64):contains(QT_CONFIG, ppc):CONFIG += ppc + contains(QT_CONFIG, ppc64):!contains(QT_CONFIG, ppc):CONFIG += ppc64 + } else { + !contains(QT_CONFIG, x86_64):contains(QT_CONFIG, x86):CONFIG += x86 + contains(QT_CONFIG, x86_64):!contains(QT_CONFIG, x86):CONFIG += x86_64 + } +} diff --git a/src/corelib/codecs/qiconvcodec.cpp b/src/corelib/codecs/qiconvcodec.cpp index 6153d70..e4389b9 100644 --- a/src/corelib/codecs/qiconvcodec.cpp +++ b/src/corelib/codecs/qiconvcodec.cpp @@ -62,7 +62,7 @@ #elif defined(Q_OS_AIX) # define NO_BOM # define UTF16 "UCS-2" -#elif defined(Q_OS_MAC) +#elif defined(Q_OS_FREEBSD) || defined(Q_OS_MAC) # define NO_BOM # if Q_BYTE_ORDER == Q_BIG_ENDIAN # define UTF16 "UTF-16BE" diff --git a/src/gui/kernel/qcocoamenuloader_mac.mm b/src/gui/kernel/qcocoamenuloader_mac.mm index ce2a92c..9ab077f 100644 --- a/src/gui/kernel/qcocoamenuloader_mac.mm +++ b/src/gui/kernel/qcocoamenuloader_mac.mm @@ -44,6 +44,7 @@ #include <qaction.h> #include <qcoreapplication.h> #include <private/qcocoamenuloader_mac_p.h> +#include <private/qapplication_p.h> #include <private/qt_mac_p.h> #include <qmenubar.h> @@ -198,6 +199,7 @@ QT_USE_NAMESPACE - (IBAction)qtDispatcherToQAction:(id)sender { + QScopedLoopLevelCounter loopLevelCounter(QApplicationPrivate::instance()->threadData); NSMenuItem *item = static_cast<NSMenuItem *>(sender); if (QAction *action = reinterpret_cast<QAction *>([item tag])) { action->trigger(); diff --git a/src/gui/kernel/qwidget_mac.mm b/src/gui/kernel/qwidget_mac.mm index c5418f6..987d2ae 100644 --- a/src/gui/kernel/qwidget_mac.mm +++ b/src/gui/kernel/qwidget_mac.mm @@ -122,7 +122,7 @@ QT_BEGIN_NAMESPACE extern "C" { extern OSStatus _HIViewScrollRectWithOptions(HIViewRef, const HIRect *, CGFloat, CGFloat, - OptionBits); + OptionBits) __attribute__ ((weak)); } #define kHIViewScrollRectAdjustInvalid 1 #define kHIViewScrollRectDontInvalidateRevealedArea 2 @@ -3781,7 +3781,10 @@ static void qt_mac_update_widget_posisiton(QWidget *q, QRect oldRect, QRect newR (oldRect.isValid() == false || newRect.isValid() == false) || // the position update is a part of a drag-and-drop operation - QDragManager::self()->object + QDragManager::self()->object || + + // we are on Panther (no HIViewSetNeedsDisplayInRect) + QSysInfo::MacintoshVersion < QSysInfo::MV_10_4 ){ HIViewSetFrame(view, &bounds); return; |