From 4280dd6bf4831379eea17e145df1fabc6a9fb901 Mon Sep 17 00:00:00 2001 From: Dominik Holland <dominik.holland@nokia.com> Date: Fri, 23 Jul 2010 09:29:12 +0200 Subject: Fixed QLayout autotest to use a dummy toplevel widget. --- tests/auto/qlayout/tst_qlayout.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/auto/qlayout/tst_qlayout.cpp b/tests/auto/qlayout/tst_qlayout.cpp index c6fe3f0..a974a42 100644 --- a/tests/auto/qlayout/tst_qlayout.cpp +++ b/tests/auto/qlayout/tst_qlayout.cpp @@ -133,12 +133,13 @@ void tst_QLayout::geometry() // For QWindowsStyle we know that QWidgetItem::geometry() and QWidget::geometry() // should be the same. QApplication::setStyle(new QWindowsStyle); - QWidget w; + QWidget topLevel; + QWidget w(&topLevel); QVBoxLayout layout(&w); SizeHinterFrame widget(QSize(100,100)); layout.addWidget(&widget); QLayoutItem *item = layout.itemAt(0); - w.show(); + topLevel.show(); QApplication::processEvents(); QCOMPARE(item->geometry().size(), QSize(100,100)); -- cgit v0.12