From 465ae8e6180c812eb91279ee4ccf047a4de2932d Mon Sep 17 00:00:00 2001 From: Marius Bugge Monsen Date: Wed, 23 Sep 2009 15:30:00 +0200 Subject: Fix QGraphicsLinearLayout::layoutDirection test failure on cocoa. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- tests/auto/qgraphicslinearlayout/tst_qgraphicslinearlayout.cpp | 5 +++++ 1 file changed, 5 insertions(+) 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 #include #include +#include +#include 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. -- cgit v0.12