From 177a78b0357a985609dc45448c8679aa0b36d7dd Mon Sep 17 00:00:00 2001 From: "Bradley T. Hughes" Date: Wed, 21 Mar 2012 10:39:39 +0100 Subject: [PATCH] Cocoa: don't call non-existent NSWindow setFrameSize MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Commit 140579cb3ef676aa3a7c3fc322ddfcc6ec1b70f2 changed a setFrame call in propagateSizeHints() to setFrameSize, which doesn't exist in NSWindow. Change it back to setFrame. Spotted due to this objc warning: qcocoawindow.mm:232:9: warning: instance method '-setFrameSize:display:' not found (return type defaults to 'id') [m_nsWindow setFrameSize : NSMakeSize(baseSize.width(),... ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~... Change-Id: Ieb7e022694ced7e59c07fdd2fc53048dab1e93c7 Reviewed-by: Morten Johan Sørvig --- src/plugins/platforms/cocoa/qcocoawindow.mm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/plugins/platforms/cocoa/qcocoawindow.mm b/src/plugins/platforms/cocoa/qcocoawindow.mm index 5229481568..310317cd15 100644 --- a/src/plugins/platforms/cocoa/qcocoawindow.mm +++ b/src/plugins/platforms/cocoa/qcocoawindow.mm @@ -231,9 +231,10 @@ void QCocoaWindow::propagateSizeHints() if (!window()->sizeIncrement().isNull()) [m_nsWindow setResizeIncrements : qt_mac_toNSSize(window()->sizeIncrement())]; + QRect rect = geometry(); QSize baseSize = window()->baseSize(); if (!baseSize.isNull() && baseSize.isValid()) { - [m_nsWindow setFrameSize : NSMakeSize(baseSize.width(), baseSize.height()) display : YES]; + [m_nsWindow setFrame:NSMakeRect(rect.x(), rect.y(), baseSize.width(), baseSize.height()) display:YES]; } }