diff options
author | Marius Bugge Monsen <mmonsen@trolltech.com> | 2009-09-23 13:30:00 (GMT) |
---|---|---|
committer | Marius Bugge Monsen <mmonsen@trolltech.com> | 2009-09-23 13:30:00 (GMT) |
commit | 465ae8e6180c812eb91279ee4ccf047a4de2932d (patch) | |
tree | 6ee811bddf1caceb124aa318ab84f950e1a56e8d /tests/auto/qgraphicslinearlayout | |
parent | 7dedc5699842d2651859e36b0ca843ec4d173056 (diff) | |
download | Qt-465ae8e6180c812eb91279ee4ccf047a4de2932d.zip Qt-465ae8e6180c812eb91279ee4ccf047a4de2932d.tar.gz Qt-465ae8e6180c812eb91279ee4ccf047a4de2932d.tar.bz2 |
Fix QGraphicsLinearLayout::layoutDirection test failure on cocoa.
The style influences the layout results. To get consistent results
across platforms, we have to specify the style when testing.
Reviewed-by: Jan-Arve Sæther
Diffstat (limited to 'tests/auto/qgraphicslinearlayout')
-rw-r--r-- | tests/auto/qgraphicslinearlayout/tst_qgraphicslinearlayout.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/auto/qgraphicslinearlayout/tst_qgraphicslinearlayout.cpp b/tests/auto/qgraphicslinearlayout/tst_qgraphicslinearlayout.cpp index 4a664a4..a5d79de 100644 --- a/tests/auto/qgraphicslinearlayout/tst_qgraphicslinearlayout.cpp +++ b/tests/auto/qgraphicslinearlayout/tst_qgraphicslinearlayout.cpp @@ -46,6 +46,8 @@ #include <qgraphicswidget.h> #include <qgraphicsscene.h> #include <qgraphicsview.h> +#include <qapplication.h> +#include <qplastiquestyle.h> class tst_QGraphicsLinearLayout : public QObject { Q_OBJECT @@ -141,6 +143,9 @@ public: // It is only called once. void tst_QGraphicsLinearLayout::initTestCase() { + // since the style will influence the results, we have to ensure + // that the tests are run using the same style on all platforms + QApplication::setStyle(new QPlastiqueStyle); } // This will be called after the last test function is executed. |