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>
{
//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];
}
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