summaryrefslogtreecommitdiffstats
path: root/tests/auto/qlabel
diff options
context:
space:
mode:
authorOlivier Goffart <ogoffart@trolltech.com>2009-09-25 18:22:31 (GMT)
committerOlivier Goffart <ogoffart@trolltech.com>2009-09-28 09:50:20 (GMT)
commit3cb2def34c32efe1155e6938eca65706dcc97aac (patch)
tree4471485f0ca6dcda935cbf20f067994b2b89a695 /tests/auto/qlabel
parentce6f58a54ccbf6c83cb2b4d725efb8fc5e1f261f (diff)
downloadQt-3cb2def34c32efe1155e6938eca65706dcc97aac.zip
Qt-3cb2def34c32efe1155e6938eca65706dcc97aac.tar.gz
Qt-3cb2def34c32efe1155e6938eca65706dcc97aac.tar.bz2
Stabilize some more tests
Diffstat (limited to 'tests/auto/qlabel')
-rw-r--r--tests/auto/qlabel/tst_qlabel.cpp15
1 files changed, 9 insertions, 6 deletions
diff --git a/tests/auto/qlabel/tst_qlabel.cpp b/tests/auto/qlabel/tst_qlabel.cpp
index 8a5e344..dd03ef3 100644
--- a/tests/auto/qlabel/tst_qlabel.cpp
+++ b/tests/auto/qlabel/tst_qlabel.cpp
@@ -57,6 +57,8 @@
# define SRCDIR ""
#endif
+#include "../../shared/util.h"
+
class Widget : public QWidget
{
public:
@@ -102,11 +104,11 @@ private slots:
void eventPropagation_data();
void eventPropagation();
void focusPolicy();
-
+
void task190318_sizes();
void sizeHint();
-
+
void task226479_movieResize();
void emptyPixmap();
@@ -413,16 +415,17 @@ void tst_QLabel::task226479_movieResize()
paintedRegion += e->region();
QLabel::paintEvent(e);
}
-
+
public:
QRegion paintedRegion;
};
-
+
Label label;
label.resize(350,350);
label.show();
QMovie *movie = new QMovie( &label );
label.setMovie(movie);
+ QTest::qWaitForWindowShown(&label);
movie->setFileName(SRCDIR "red.png");
movie->start();
QTest::qWait(50);
@@ -431,8 +434,8 @@ void tst_QLabel::task226479_movieResize()
movie->setFileName(SRCDIR "green.png");
movie->start();
QTest::qWait(50);
-
- QCOMPARE(label.paintedRegion , QRegion(label.rect()) );
+
+ QTRY_COMPARE(label.paintedRegion , QRegion(label.rect()) );
}
void tst_QLabel::emptyPixmap()