summaryrefslogtreecommitdiffstats
path: root/tests/auto/qgraphicslinearlayout
diff options
context:
space:
mode:
authorMarius Bugge Monsen <mmonsen@trolltech.com>2009-09-23 15:30:00 +0200
committerMarius Bugge Monsen <mmonsen@trolltech.com>2009-09-23 15:30:00 +0200
commit465ae8e6180c812eb91279ee4ccf047a4de2932d (patch)
tree6ee811bddf1caceb124aa318ab84f950e1a56e8d /tests/auto/qgraphicslinearlayout
parent7dedc5699842d2651859e36b0ca843ec4d173056 (diff)
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.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/auto/qgraphicslinearlayout/tst_qgraphicslinearlayout.cpp b/tests/auto/qgraphicslinearlayout/tst_qgraphicslinearlayout.cpp
index 4a664a449c..a5d79ded29 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.