summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@digia.com>2014-01-23 16:28:30 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-01-28 08:27:53 +0100
commit0841a5e3677840c6d5b81e8466c9a7d2d3905e1a (patch)
tree0d39db7d4a1b65a7ec0f21884d2088bb2b7859fe /tests
parent4c980d2e9bc8f656179ea32fa3207d98ada59de4 (diff)
tst_qcolumnview: Set layout direction on widgets instead of application.
Most of the test is executed in RTL mode since it is never restored. Task-number: QTBUG-36395 Change-Id: I110966085a5a265f093fc4479eebc1f1bf0614c1 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/widgets/itemviews/qcolumnview/tst_qcolumnview.cpp17
1 files changed, 8 insertions, 9 deletions
diff --git a/tests/auto/widgets/itemviews/qcolumnview/tst_qcolumnview.cpp b/tests/auto/widgets/itemviews/qcolumnview/tst_qcolumnview.cpp
index 08c8ed1f05..1ed33b9233 100644
--- a/tests/auto/widgets/itemviews/qcolumnview/tst_qcolumnview.cpp
+++ b/tests/auto/widgets/itemviews/qcolumnview/tst_qcolumnview.cpp
@@ -370,9 +370,9 @@ void tst_QColumnView::scrollContentsBy_data()
void tst_QColumnView::scrollContentsBy()
{
QFETCH(bool, reverse);
- if (reverse)
- qApp->setLayoutDirection(Qt::RightToLeft);
ColumnView view;
+ if (reverse)
+ view.setLayoutDirection(Qt::RightToLeft);
view.ScrollContentsBy(-1, -1);
view.ScrollContentsBy(0, 0);
@@ -405,9 +405,9 @@ void tst_QColumnView::scrollTo()
{
QFETCH(bool, reverse);
QFETCH(bool, giveFocus);
- if (reverse)
- qApp->setLayoutDirection(Qt::RightToLeft);
QWidget topLevel;
+ if (reverse)
+ topLevel.setLayoutDirection(Qt::RightToLeft);
ColumnView view(&topLevel);
view.resize(200, 200);
topLevel.show();
@@ -514,10 +514,9 @@ void tst_QColumnView::moveCursor_data()
void tst_QColumnView::moveCursor()
{
QFETCH(bool, reverse);
- if (reverse)
- qApp->setLayoutDirection(Qt::RightToLeft);
ColumnView view;
-
+ if (reverse)
+ view.setLayoutDirection(Qt::RightToLeft);
// don't crash
view.MoveCursor(ColumnView::MoveUp, Qt::NoModifier);
@@ -722,9 +721,9 @@ void tst_QColumnView::moveGrip_data()
void tst_QColumnView::moveGrip()
{
QFETCH(bool, reverse);
- if (reverse)
- qApp->setLayoutDirection(Qt::RightToLeft);
QWidget topLevel;
+ if (reverse)
+ topLevel.setLayoutDirection(Qt::RightToLeft);
ColumnView view(&topLevel);
TreeModel model;
view.setModel(&model);