Cocoa: don't show window when calling raise()
Calling raise() on a hidden window should not show it. The setVisible() function will ensure that the window is raised (since we use orderFront or makeKeyAndOrderFront). This fixes the failing tst_QDockWidget::task169808_setFloating() test as well. Task-number: QTBUG-24774 Change-Id: If34472ebbcd615c10654efafd54c84c03d10bc8c Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>bb10
parent
8660f6e385
commit
9581e5895a
|
|
@ -198,13 +198,17 @@ void QCocoaWindow::raise()
|
|||
{
|
||||
//qDebug() << "raise" << this;
|
||||
// ### handle spaces (see Qt 4 raise_sys in qwidget_mac.mm)
|
||||
if (m_nsWindow)
|
||||
if (!m_nsWindow)
|
||||
return;
|
||||
if ([m_nsWindow isVisible])
|
||||
[m_nsWindow orderFront: m_nsWindow];
|
||||
}
|
||||
|
||||
void QCocoaWindow::lower()
|
||||
{
|
||||
if (m_nsWindow)
|
||||
if (!m_nsWindow)
|
||||
return;
|
||||
if ([m_nsWindow isVisible])
|
||||
[m_nsWindow orderBack: m_nsWindow];
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -764,9 +764,6 @@ void tst_QDockWidget::task169808_setFloating()
|
|||
qt_x11_wait_for_window_manager(&mw);
|
||||
#endif
|
||||
|
||||
#ifdef Q_OS_MAC
|
||||
QEXPECT_FAIL("", "Window handling: QTBUG-24774", Abort);
|
||||
#endif
|
||||
QCOMPARE(dw->widget()->size(), dw->widget()->sizeHint());
|
||||
|
||||
//and now we try to test if the contents margin is taken into account
|
||||
|
|
|
|||
Loading…
Reference in New Issue