From aad2316995d46cb8a1bfc2763c0617b0c7c92307 Mon Sep 17 00:00:00 2001 From: Morten Sorvig Date: Fri, 11 Sep 2009 07:27:16 +0200 Subject: Run on 10.3 Panther. HIViewSetNeedsDisplayInRect was added in 10.4. --- src/gui/kernel/qwidget_mac.mm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/gui/kernel/qwidget_mac.mm b/src/gui/kernel/qwidget_mac.mm index c5418f6..09ac2c3 100644 --- a/src/gui/kernel/qwidget_mac.mm +++ b/src/gui/kernel/qwidget_mac.mm @@ -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; -- cgit v0.12 From 8ee8f3383c05c0e82d81304f60b97ca7659074cc Mon Sep 17 00:00:00 2001 From: Morten Sorvig Date: Fri, 11 Sep 2009 07:51:09 +0200 Subject: Run on 10.3. _HIViewScrollRectWithOptions needs to be declared as a weak-linked symbol in order to make static linking work. --- src/gui/kernel/qwidget_mac.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/kernel/qwidget_mac.mm b/src/gui/kernel/qwidget_mac.mm index 09ac2c3..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 -- cgit v0.12 From c03d1a9e12c9b9766c1e652985aeeab23be352a8 Mon Sep 17 00:00:00 2001 From: Morten Sorvig Date: Thu, 13 Aug 2009 12:37:39 +0200 Subject: 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. Reviewed-by: Marius Storm-Olsen --- mkspecs/features/mac/default_post.prf | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/mkspecs/features/mac/default_post.prf b/mkspecs/features/mac/default_post.prf index ea9e9bd..210a704 100644 --- a/mkspecs/features/mac/default_post.prf +++ b/mkspecs/features/mac/default_post.prf @@ -1,2 +1,18 @@ 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. +message(hei $$QT_CONFIG ) +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 + } +} -- cgit v0.12 From 6ac7728fe442988e86786cb75a851063b4380404 Mon Sep 17 00:00:00 2001 From: Morten Sorvig Date: Thu, 13 Aug 2009 13:08:46 +0200 Subject: Remove yet another forgotten debug message. --- mkspecs/features/mac/default_post.prf | 1 - 1 file changed, 1 deletion(-) diff --git a/mkspecs/features/mac/default_post.prf b/mkspecs/features/mac/default_post.prf index 210a704..4999762 100644 --- a/mkspecs/features/mac/default_post.prf +++ b/mkspecs/features/mac/default_post.prf @@ -6,7 +6,6 @@ load(default_post) # 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. -message(hei $$QT_CONFIG ) qt:!isEmpty(QT_CONFIG) { contains(QMAKE_HOST.arch, ppc) { !contains(QT_CONFIG, ppc64):contains(QT_CONFIG, ppc):CONFIG += ppc -- cgit v0.12 From 0293aff5c44202e5c62e229b74d8bd0bf9206185 Mon Sep 17 00:00:00 2001 From: Morten Sorvig Date: Fri, 11 Sep 2009 12:49:25 +0200 Subject: Fix memory leak when deleteLater is triggered via the main menu bar. The deleteLater was beeing created with loopLevel of 1, causing it to be defferd until QApplication::exec() returned. Add a QScopedLoopLevelCounter to increase the loopLevel while triggering the action. RevBy: Brad --- src/gui/kernel/qcocoamenuloader_mac.mm | 2 ++ 1 file changed, 2 insertions(+) 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 #include #include +#include #include #include @@ -198,6 +199,7 @@ QT_USE_NAMESPACE - (IBAction)qtDispatcherToQAction:(id)sender { + QScopedLoopLevelCounter loopLevelCounter(QApplicationPrivate::instance()->threadData); NSMenuItem *item = static_cast(sender); if (QAction *action = reinterpret_cast([item tag])) { action->trigger(); -- cgit v0.12 From bd8f1171ea1d564bb9b8e04b1a220e5559d60423 Mon Sep 17 00:00:00 2001 From: Raphael Kubo da Costa Date: Sun, 13 Sep 2009 09:40:37 +0200 Subject: Fix libiconv support on FreeBSD. For some reason iconv support was broken in Qt 4.5 on FreeBSD, and this patch was made to fix that. Original patch by Max Brazhnikov . Original message: Enable libiconv support. Didn't get where the real problem is, but using UTF-16LE/BE as default encoding (see patch) fixes the issue. Merge-request: 1480 Reviewed-by: Thiago Macieira --- src/corelib/codecs/qiconvcodec.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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" -- cgit v0.12