summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorAlexis Menard <alexis.menard@trolltech.com>2009-10-01 10:45:52 (GMT)
committerAlexis Menard <alexis.menard@trolltech.com>2009-10-01 10:47:17 (GMT)
commit3b37aff1e6c641290c155a6aa14d83167725556b (patch)
treea73dd07e601803ed8f121e43e83dd6603d3b7417 /tests
parenta7273386adb9399ecdc7b7c8f4b041099db042ef (diff)
downloadQt-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')
-rw-r--r--tests/auto/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp8
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)