summaryrefslogtreecommitdiffstats
path: root/tests/auto/qsplitter/tst_qsplitter.cpp
diff options
context:
space:
mode:
authorDominik Holland <dominik.holland@nokia.com>2010-07-23 06:41:08 (GMT)
committerHarald Fernengel <harald.fernengel@nokia.com>2010-11-02 14:24:54 (GMT)
commitb10d49dde4e793f380401900fddfc939d5ff20ba (patch)
tree3fdefa7d26d7cf0c906665e2d380599a878a133b /tests/auto/qsplitter/tst_qsplitter.cpp
parentde9a3a8c71079e89173bea8029bbb4d0f3876bd5 (diff)
downloadQt-b10d49dde4e793f380401900fddfc939d5ff20ba.zip
Qt-b10d49dde4e793f380401900fddfc939d5ff20ba.tar.gz
Qt-b10d49dde4e793f380401900fddfc939d5ff20ba.tar.bz2
Fixed QSplitter autotest to use a dummy toplevel widget.
Diffstat (limited to 'tests/auto/qsplitter/tst_qsplitter.cpp')
-rw-r--r--tests/auto/qsplitter/tst_qsplitter.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/tests/auto/qsplitter/tst_qsplitter.cpp b/tests/auto/qsplitter/tst_qsplitter.cpp
index e7b5dc7..7cb2b65 100644
--- a/tests/auto/qsplitter/tst_qsplitter.cpp
+++ b/tests/auto/qsplitter/tst_qsplitter.cpp
@@ -1230,7 +1230,8 @@ void tst_QSplitter::testShowHide()
QSplitter *split = new QSplitter(Qt::Horizontal);
- QWidget widget;
+ QWidget topLevel;
+ QWidget widget(&topLevel);
widget.resize(400 + split->handleWidth(), 200);
QVBoxLayout *lay=new QVBoxLayout(&widget);
lay->setMargin(0);
@@ -1240,7 +1241,7 @@ void tst_QSplitter::testShowHide()
split->setSizes(QList<int>() << 200 << 200);
lay->addWidget(split);
widget.setLayout(lay);
- widget.show();
+ topLevel.show();
QTest::qWait(100);
@@ -1378,8 +1379,9 @@ class MyTextEdit : public QTextEdit
void tst_QSplitter::task169702_sizes()
{
+ QWidget topLevel;
// Create two nested (non-collapsible) splitters
- QSplitter* outerSplitter = new QSplitter(Qt::Vertical);
+ QSplitter* outerSplitter = new QSplitter(Qt::Vertical, &topLevel);
outerSplitter->setChildrenCollapsible(false);
QSplitter* splitter = new QSplitter(Qt::Horizontal, outerSplitter);
splitter->setChildrenCollapsible(false);
@@ -1396,12 +1398,12 @@ void tst_QSplitter::task169702_sizes()
splitter->addWidget(new QTextEdit("Bar"));
outerSplitter->setGeometry(100, 100, 500, 500);
- outerSplitter->show();
+ topLevel.show();
QTest::qWait(100);
testW->m_iFactor++;
testW->updateGeometry();
- QTest::qWait(100);
+ QTest::qWait(500);//100 is too fast for Maemo
//Make sure the minimimSizeHint is respected
QCOMPARE(testW->size().height(), testW->minimumSizeHint().height());