diff options
author | Jan-Arve Sæther <jan-arve.saether@nokia.com> | 2009-11-10 13:45:23 (GMT) |
---|---|---|
committer | Jan-Arve Sæther <jan-arve.saether@nokia.com> | 2009-11-10 13:45:23 (GMT) |
commit | 56077c71a771e0e92ead2244df51a85669529274 (patch) | |
tree | b0fb8c08dc5db9eef32bb46aa4524ec38c32700c /tests | |
parent | d845505fd57ad4b06499b5b125703e80bbae692a (diff) | |
download | Qt-56077c71a771e0e92ead2244df51a85669529274.zip Qt-56077c71a771e0e92ead2244df51a85669529274.tar.gz Qt-56077c71a771e0e92ead2244df51a85669529274.tar.bz2 |
processEvents() does not always process *all* events in the queue.
This was a small behaviour change introduced by Brad that caused the
autotest to fail (not every time). Our workaround is to call
sendPostedEvents().
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/qgraphicslinearlayout/tst_qgraphicslinearlayout.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/auto/qgraphicslinearlayout/tst_qgraphicslinearlayout.cpp b/tests/auto/qgraphicslinearlayout/tst_qgraphicslinearlayout.cpp index 546f92d..d3087dc 100644 --- a/tests/auto/qgraphicslinearlayout/tst_qgraphicslinearlayout.cpp +++ b/tests/auto/qgraphicslinearlayout/tst_qgraphicslinearlayout.cpp @@ -664,16 +664,16 @@ void tst_QGraphicsLinearLayout::invalidate() widget->show(); layout.setContentsMargins(1, 2, 3, 4); - qApp->processEvents(); + QApplication::sendPostedEvents(0, 0); QCOMPARE(layout.layoutRequest, 1); layout.setOrientation(Qt::Vertical); - qApp->processEvents(); + QApplication::sendPostedEvents(0, 0); QCOMPARE(layout.layoutRequest, 2); for (int i = 0; i < count; ++i) layout.invalidate(); // Event is compressed, should only get one layoutrequest - qApp->processEvents(); + QApplication::sendPostedEvents(0, 0); QCOMPARE(layout.layoutRequest, count ? 3 : 2); delete widget; } |