-
Bug
-
Resolution: Invalid
-
P0: Blocker
-
4.7.2
-
None
-
Windows, Symbian RelTestRound2
f75d55f1a71cae9864ca4bf12c92fcd9e34ed651 commit changes behavior of WA_QuitOnClose when WA_DontShowOnScreen
was used. Now it works differently between two Qt versions. Therefore following test case from BC suite is failed.
{
int argc = 0;
QApplication app(argc, 0, QApplication::GuiServer);
QTimer timer;
timer.setInterval(100);
QSignalSpy spy(&app, SIGNAL(aboutToQuit()));
QSignalSpy spy2(&timer, SIGNAL(timeout()));
QPointer<QMainWindow> mainWindow = new QMainWindow;
QPointer<QWidget> invisibleTopLevelWidget = new QWidget;
invisibleTopLevelWidget->setAttribute(Qt::WA_DontShowOnScreen);
QVERIFY(app.quitOnLastWindowClosed());
QVERIFY(mainWindow->testAttribute(Qt::WA_QuitOnClose));
QVERIFY(invisibleTopLevelWidget->testAttribute(Qt::WA_QuitOnClose));
QVERIFY(invisibleTopLevelWidget->testAttribute(Qt::WA_DontShowOnScreen));
mainWindow->show();
invisibleTopLevelWidget->show();
timer.start();
QTimer::singleShot(1000, mainWindow, SLOT(close())); // This should quit the application
QTimer::singleShot(2000, &app, SLOT(quit())); // This makes sure we quit even if it didn't
app.exec();
QCOMPARE(spy.count(), 1);
int count = spy2.count();
QVERIFY(spy2.count() < 15); // Should be around 10 if closing caused the quit
}
This test case was deleted from tests/auto in Qt 4.7. But it is significant changes and can affect on application developed using Qt 4.6 and run on Qt 4.7.