Fix an race condition in the auto test.
Deleting the page in the wizard without removing it first leads to a crash when the wizard tries to access a deleted page. Reviewed-by: Samuel Rødal (cherry picked from commit 4024a08239c3e69bb2e0ca045ccbdf3fc900f675)
This commit is contained in:
parent
e37d9e9691
commit
5edb03f855
@ -2551,8 +2551,8 @@ void tst_QWizard::task177022_setFixedSize()
|
||||
QWizard wiz;
|
||||
QWizardPage page1;
|
||||
QWizardPage page2;
|
||||
wiz.addPage(&page1);
|
||||
wiz.addPage(&page2);
|
||||
int page1_id = wiz.addPage(&page1);
|
||||
int page2_id = wiz.addPage(&page2);
|
||||
wiz.setFixedSize(width, height);
|
||||
if (wiz.wizardStyle() == QWizard::AeroStyle)
|
||||
QEXPECT_FAIL("", "this probably relates to non-client area hack for AeroStyle titlebar "
|
||||
@ -2579,6 +2579,8 @@ void tst_QWizard::task177022_setFixedSize()
|
||||
QCOMPARE(wiz.maximumWidth(), width);
|
||||
QCOMPARE(wiz.maximumHeight(), height);
|
||||
|
||||
wiz.removePage(page1_id);
|
||||
wiz.removePage(page2_id);
|
||||
}
|
||||
|
||||
void tst_QWizard::task248107_backButton()
|
||||
|
Loading…
Reference in New Issue
Block a user