diff options
author | Alexis Menard <alexis.menard@trolltech.com> | 2009-10-01 10:45:52 (GMT) |
---|---|---|
committer | Alexis Menard <alexis.menard@trolltech.com> | 2009-10-01 10:47:17 (GMT) |
commit | 3b37aff1e6c641290c155a6aa14d83167725556b (patch) | |
tree | a73dd07e601803ed8f121e43e83dd6603d3b7417 /tests/auto/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp | |
parent | a7273386adb9399ecdc7b7c8f4b041099db042ef (diff) | |
download | Qt-3b37aff1e6c641290c155a6aa14d83167725556b.zip Qt-3b37aff1e6c641290c155a6aa14d83167725556b.tar.gz Qt-3b37aff1e6c641290c155a6aa14d83167725556b.tar.bz2 |
Fix auto-test that was crashing on Mac Carbon.
If you let top level widget hanging around with a broken state it
may crash when a process event is triggered.
Reviewed-by:ogoffart
Diffstat (limited to 'tests/auto/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp')
-rw-r--r-- | tests/auto/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/auto/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp b/tests/auto/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp index 00fae2f..e70d286 100644 --- a/tests/auto/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp +++ b/tests/auto/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp @@ -3059,6 +3059,8 @@ void tst_QGraphicsProxyWidget::deleteProxyForChildWidget() proxy->setWidget(0); //just don't crash + QApplication::processEvents(); + delete combo; } void tst_QGraphicsProxyWidget::bypassGraphicsProxyWidget_data() @@ -3090,11 +3092,17 @@ void tst_QGraphicsProxyWidget::bypassGraphicsProxyWidget() if (bypass) flags |= Qt::BypassGraphicsProxyWidget; QFileDialog *dialog = new QFileDialog(widget, flags); + dialog->setOption(QFileDialog::DontUseNativeDialog, true); dialog->show(); QCOMPARE(proxy->childItems().size(), bypass ? 0 : 1); if (!bypass) QCOMPARE(((QGraphicsProxyWidget *)proxy->childItems().first())->widget(), (QWidget *)dialog); + + dialog->hide(); + QApplication::processEvents(); + delete dialog; + delete widget; } static void makeDndEvent(QGraphicsSceneDragDropEvent *event, QGraphicsView *view, const QPointF &pos) |