diff options
author | Oswald Buddenhagen <oswald.buddenhagen@nokia.com> | 2009-06-23 10:32:42 (GMT) |
---|---|---|
committer | Oswald Buddenhagen <oswald.buddenhagen@nokia.com> | 2009-06-23 10:32:42 (GMT) |
commit | e1eceedaa635d0180eb798b00c3da93156d7af63 (patch) | |
tree | 04325155309fd225d68a4cf118be34c2378cb26a /tests/auto/qwizard/tst_qwizard.cpp | |
parent | 2c96aeb45320ade7e2c074433560185f16631374 (diff) | |
parent | 71be46c61c582d2f4635a1e420e44d57ddb5857a (diff) | |
download | Qt-e1eceedaa635d0180eb798b00c3da93156d7af63.zip Qt-e1eceedaa635d0180eb798b00c3da93156d7af63.tar.gz Qt-e1eceedaa635d0180eb798b00c3da93156d7af63.tar.bz2 |
Merge commit 'origin/4.5'
Conflicts:
src/sql/drivers/psql/qsql_psql.cpp
Diffstat (limited to 'tests/auto/qwizard/tst_qwizard.cpp')
-rw-r--r-- | tests/auto/qwizard/tst_qwizard.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/auto/qwizard/tst_qwizard.cpp b/tests/auto/qwizard/tst_qwizard.cpp index 71e1c3e..e5074b3 100644 --- a/tests/auto/qwizard/tst_qwizard.cpp +++ b/tests/auto/qwizard/tst_qwizard.cpp @@ -112,6 +112,7 @@ private slots: void task161658_alignments(); void task177022_setFixedSize(); void task248107_backButton(); + void task255350_fieldObjectDestroyed(); /* Things that could be added: @@ -2517,5 +2518,26 @@ void tst_QWizard::task248107_backButton() QCOMPARE(wizard.currentPage(), &page1); } +class WizardPage_task255350 : public QWizardPage +{ +public: + QLineEdit *lineEdit; + WizardPage_task255350() + : lineEdit(new QLineEdit) + { + registerField("dummy*", lineEdit); + } +}; + +void tst_QWizard::task255350_fieldObjectDestroyed() +{ + QWizard wizard; + WizardPage_task255350 *page = new WizardPage_task255350; + int id = wizard.addPage(page); + delete page->lineEdit; + wizard.removePage(id); // don't crash! + delete page; +} + QTEST_MAIN(tst_QWizard) #include "tst_qwizard.moc" |