summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel
diff options
context:
space:
mode:
authorPulse Build System <qt-info@nokia.com>2010-01-27 03:31:26 (GMT)
committerPulse Build System <qt-info@nokia.com>2010-01-27 03:31:26 (GMT)
commit35386ae28887d56cf6fd6f6cc7ceaf0506abe18a (patch)
tree848df3f647806f49e192b067c82fbb5d63bd2165 /src/gui/kernel
parentd7d4abbcbf4f39a0b3d568af111c81be18d2a83a (diff)
parente631e7bde04aea81292a950cb00a93764714c093 (diff)
downloadQt-35386ae28887d56cf6fd6f6cc7ceaf0506abe18a.zip
Qt-35386ae28887d56cf6fd6f6cc7ceaf0506abe18a.tar.gz
Qt-35386ae28887d56cf6fd6f6cc7ceaf0506abe18a.tar.bz2
Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.6-integration
* '4.6' of git@scm.dev.nokia.troll.no:qt/oslo-staging-1: (27 commits) When checking to see if a signal is connected, compare the match-arguments too Do the refcounting of services watched properly. Autotest: make the test valid for multiple Qt versions Cocoa: qfiledialog test spits out memory warnings Drawing fake buttons using QMacStyle+QStyleOptionViewItemV4 lead to crash. Don't use QDebug references. Instead, pass by value. QNativeSocketEngine: Set OS error strings on failed read() QNativeSocketEngine: Also handle unknown errors from socket engine Qt/Cocoa Event Dispatcher Problem in modal dialogs Cocoa: Usage of QMacCocoaAutoReleasePool makes CPU peak Updated WebKit from /home/shausman/src/webkit/trunk to qtwebkit/qtwebkit-4.6 ( a54fd11a3abcd6d9c858e8162e85fd1f3aa21db1 ) Updated WebKit from /home/shausman/src/webkit/trunk to qtwebkit/qtwebkit-4.6 ( 0bc66e2d86149e0fb6a33428e4f23ebfe83bfde4 ) 'test -e' is a bashism. It's not available in traditional sh. QFileNetworkReply: Use a QFileEngine Crash when deleting QMainWindow with native toolbar on Cocoa. QNativeSocketEngine_win: Don't mess with linger settings Cosmetic: move the "Alsa support..." line to a more appropriate place Doc: Fixed broken link. Doc: Added a warning about the Accelerated Graphics Driver example. Doc: Fixed installation information for Qt for Embedded Linux. ...
Diffstat (limited to 'src/gui/kernel')
-rw-r--r--src/gui/kernel/qapplication_mac.mm4
-rw-r--r--src/gui/kernel/qeventdispatcher_mac.mm2
-rw-r--r--src/gui/kernel/qt_cocoa_helpers_mac.mm16
-rw-r--r--src/gui/kernel/qwidget.cpp2
4 files changed, 22 insertions, 2 deletions
diff --git a/src/gui/kernel/qapplication_mac.mm b/src/gui/kernel/qapplication_mac.mm
index 6aebef5..847c58d 100644
--- a/src/gui/kernel/qapplication_mac.mm
+++ b/src/gui/kernel/qapplication_mac.mm
@@ -227,6 +227,10 @@ void onApplicationChangedActivation( bool activated );
static void qt_mac_read_fontsmoothing_settings()
{
+#ifdef QT_MAC_USE_COCOA
+ QMacCocoaAutoReleasePool pool2;
+#endif
+
NSInteger appleFontSmoothing = [[NSUserDefaults standardUserDefaults] integerForKey:@"AppleFontSmoothing"];
qt_applefontsmoothing_enabled = (appleFontSmoothing > 0);
}
diff --git a/src/gui/kernel/qeventdispatcher_mac.mm b/src/gui/kernel/qeventdispatcher_mac.mm
index eda75db..c7c7caf 100644
--- a/src/gui/kernel/qeventdispatcher_mac.mm
+++ b/src/gui/kernel/qeventdispatcher_mac.mm
@@ -569,7 +569,7 @@ bool QEventDispatcherMac::processEvents(QEventLoop::ProcessEventsFlags flags)
// in cocoa. [NSApp run] should be called at least once for any cocoa app.
if (NSModalSession session = d->currentModalSession()) {
QBoolBlocker execGuard(d->currentExecIsNSAppRun, false);
- while (!d->interrupt && [NSApp runModalSession:session] == NSRunContinuesResponse)
+ while ([NSApp runModalSession:session] == NSRunContinuesResponse && !d->interrupt)
qt_mac_waitForMoreModalSessionEvents();
if (!d->interrupt && session == d->currentModalSessionCached) {
// INVARIANT: Someone called e.g. [NSApp stopModal:] from outside the event
diff --git a/src/gui/kernel/qt_cocoa_helpers_mac.mm b/src/gui/kernel/qt_cocoa_helpers_mac.mm
index e36ab9b..e06a810 100644
--- a/src/gui/kernel/qt_cocoa_helpers_mac.mm
+++ b/src/gui/kernel/qt_cocoa_helpers_mac.mm
@@ -143,6 +143,9 @@ extern QPointer<QWidget> qt_button_down; //qapplication_mac.cpp
void macWindowFade(void * /*OSWindowRef*/ window, float durationSeconds)
{
+#ifdef QT_MAC_USE_COCOA
+ QMacCocoaAutoReleasePool pool;
+#endif
OSWindowRef wnd = static_cast<OSWindowRef>(window);
if (wnd) {
QWidget *widget;
@@ -1278,4 +1281,17 @@ void qt_cocoaChangeOverrideCursor(const QCursor &cursor)
}
#endif
+QMacCocoaAutoReleasePool::QMacCocoaAutoReleasePool()
+{
+#ifndef QT_MAC_USE_COCOA
+ NSApplicationLoad();
+#endif
+ pool = (void*)[[NSAutoreleasePool alloc] init];
+}
+
+QMacCocoaAutoReleasePool::~QMacCocoaAutoReleasePool()
+{
+ [(NSAutoreleasePool*)pool release];
+}
+
QT_END_NAMESPACE
diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp
index ede87de..ffad38b 100644
--- a/src/gui/kernel/qwidget.cpp
+++ b/src/gui/kernel/qwidget.cpp
@@ -3352,7 +3352,7 @@ QPoint QWidget::pos() const
\note Setting the size to \c{QSize(0, 0)} will cause the widget to not
appear on screen. This also applies to windows.
- \sa pos, geometry, minimumSize, maximumSize, resizeEvent()
+ \sa pos, geometry, minimumSize, maximumSize, resizeEvent(), adjustSize()
*/
/*!