diff options
author | Bea Lam <bea.lam@nokia.com> | 2011-03-10 01:26:38 (GMT) |
---|---|---|
committer | Bea Lam <bea.lam@nokia.com> | 2011-03-10 01:26:38 (GMT) |
commit | 5098b3cc1127a1a4cbd66d0eeea8f2ec5f625bb9 (patch) | |
tree | 6aada3a65df762506a8615abcaed7348b4186824 /tests/auto/declarative/qdeclarativetext | |
parent | 4320e48d4bdfb58e2b59e82cd2f5f1131af88b3e (diff) | |
download | Qt-5098b3cc1127a1a4cbd66d0eeea8f2ec5f625bb9.zip Qt-5098b3cc1127a1a4cbd66d0eeea8f2ec5f625bb9.tar.gz Qt-5098b3cc1127a1a4cbd66d0eeea8f2ec5f625bb9.tar.bz2 |
Fix failing tests
RTL text-related tests were failing on mac since
QApplication::keyboardInputDirection() is not always initialized
when the QApplication instance is created.
Change-Id: Ifa7214ffb1941d824a9425015b38aa77366381bb
Reviewed-by: Martin Jones
Diffstat (limited to 'tests/auto/declarative/qdeclarativetext')
-rw-r--r-- | tests/auto/declarative/qdeclarativetext/tst_qdeclarativetext.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/auto/declarative/qdeclarativetext/tst_qdeclarativetext.cpp b/tests/auto/declarative/qdeclarativetext/tst_qdeclarativetext.cpp index b5dfba8..2d52642 100644 --- a/tests/auto/declarative/qdeclarativetext/tst_qdeclarativetext.cpp +++ b/tests/auto/declarative/qdeclarativetext/tst_qdeclarativetext.cpp @@ -602,6 +602,7 @@ void tst_qdeclarativetext::horizontalAlignment_RightToLeft() QCOMPARE(text->hAlign(), QDeclarativeText::AlignLeft); QVERIFY(textPrivate->layout.lineAt(0).naturalTextRect().left() < canvas->width()/2); +#ifndef Q_OS_MAC // QTBUG-18040 // empty text with implicit alignment follows the system locale-based // keyboard input direction from QApplication::keyboardInputDirection text->setText(""); @@ -609,8 +610,11 @@ void tst_qdeclarativetext::horizontalAlignment_RightToLeft() QDeclarativeText::AlignLeft : QDeclarativeText::AlignRight); text->setHAlign(QDeclarativeText::AlignRight); QCOMPARE(text->hAlign(), QDeclarativeText::AlignRight); +#endif + delete canvas; +#ifndef Q_OS_MAC // QTBUG-18040 // alignment of Text with no text set to it QString componentStr = "import QtQuick 1.0\nText {}"; QDeclarativeComponent textComponent(&engine); @@ -619,6 +623,7 @@ void tst_qdeclarativetext::horizontalAlignment_RightToLeft() QCOMPARE(textObject->hAlign(), QApplication::keyboardInputDirection() == Qt::LeftToRight ? QDeclarativeText::AlignLeft : QDeclarativeText::AlignRight); delete textObject; +#endif } void tst_qdeclarativetext::verticalAlignment() |