diff options
author | Fabien Freling <fabien.freling@nokia.com> | 2011-04-14 17:12:59 (GMT) |
---|---|---|
committer | Fabien Freling <fabien.freling@nokia.com> | 2011-04-15 10:16:37 (GMT) |
commit | 3bff1637cd49617d334c1be63c20e008fac93be1 (patch) | |
tree | 24e94f5d7085370b89ed35f6192ee02f6c7863fb /tests | |
parent | 45c60ceac3d5a401543d7d56a44d1f9227464431 (diff) | |
download | Qt-3bff1637cd49617d334c1be63c20e008fac93be1.zip Qt-3bff1637cd49617d334c1be63c20e008fac93be1.tar.gz Qt-3bff1637cd49617d334c1be63c20e008fac93be1.tar.bz2 |
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: jasplin
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/qwizard/tst_qwizard.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/auto/qwizard/tst_qwizard.cpp b/tests/auto/qwizard/tst_qwizard.cpp index a813727..bbac8a3 100644 --- a/tests/auto/qwizard/tst_qwizard.cpp +++ b/tests/auto/qwizard/tst_qwizard.cpp @@ -1770,8 +1770,11 @@ public: ~TestWizard() { - foreach (int id, pageIds) - delete page(id); + foreach (int id, pageIds) { + QWizardPage *page_to_delete = page(id); + removePage(id); + delete page_to_delete; + } } void applyOperations(const QList<Operation *> &operations) |