aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qtquick2
diff options
context:
space:
mode:
authorMichael Brasser <michael.brasser@nokia.com>2011-12-01 13:01:36 +1000
committerQt by Nokia <qt-info@nokia.com>2011-12-05 01:11:00 +0100
commit5a2bcb807ce1ec850acf03f0fee0bfc3214a4f3b (patch)
treeb418187254eac2f3a4112aad22ba08f8b5280585 /tests/auto/qtquick2
parent095f537bc9eab042c6eb88e5e671b0914bba5d68 (diff)
Test fixes for OS X.
Change-Id: Idee212db1ee267d44463886de6a7918404ba549d Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
Diffstat (limited to 'tests/auto/qtquick2')
-rw-r--r--tests/auto/qtquick2/qquickpositioners/tst_qquickpositioners.cpp10
-rw-r--r--tests/auto/qtquick2/qquicktext/data/multilineelide.qml2
-rw-r--r--tests/auto/qtquick2/qquicktextinput/tst_qquicktextinput.cpp22
3 files changed, 14 insertions, 20 deletions
diff --git a/tests/auto/qtquick2/qquickpositioners/tst_qquickpositioners.cpp b/tests/auto/qtquick2/qquickpositioners/tst_qquickpositioners.cpp
index 867de8cb9e..b6cc68f18e 100644
--- a/tests/auto/qtquick2/qquickpositioners/tst_qquickpositioners.cpp
+++ b/tests/auto/qtquick2/qquickpositioners/tst_qquickpositioners.cpp
@@ -1299,12 +1299,10 @@ void tst_qquickpositioners::test_mirroring()
QTRY_VERIFY(itemA->x() != itemB->x());
}
- QQuickItemPrivate* rootPrivateB = QQuickItemPrivate::get(rootB);
-
- rootPrivateB->effectiveLayoutMirror = true; // LayoutMirroring.enabled: true
- rootPrivateB->isMirrorImplicit = false;
- rootPrivateB->inheritMirrorFromItem = true; // LayoutMirroring.childrenInherit: true
- rootPrivateB->resolveLayoutMirror();
+ QDeclarativeProperty enabledProp(rootB, "LayoutMirroring.enabled", qmlContext(rootB));
+ enabledProp.write(true);
+ QDeclarativeProperty inheritProp(rootB, "LayoutMirroring.childrenInherit", qmlContext(rootB));
+ inheritProp.write(true);
// RTL == mirror
foreach (const QString objectName, objectNames) {
diff --git a/tests/auto/qtquick2/qquicktext/data/multilineelide.qml b/tests/auto/qtquick2/qquicktext/data/multilineelide.qml
index 23398a84a1..f3bb65775b 100644
--- a/tests/auto/qtquick2/qquicktext/data/multilineelide.qml
+++ b/tests/auto/qtquick2/qquicktext/data/multilineelide.qml
@@ -5,6 +5,6 @@ Text {
wrapMode: Text.WordWrap
elide: Text.ElideRight
maximumLineCount: 3
- text: "the quick brown fox jumped over the lazy dog the quick brown fox jumped over the lazy dog"
+ text: "the quick brown fox jumped over the lazy dog the quick brown fox jumped over the lazy dog the quick brown fox jumped over the lazy dog"
}
diff --git a/tests/auto/qtquick2/qquicktextinput/tst_qquicktextinput.cpp b/tests/auto/qtquick2/qquicktextinput/tst_qquicktextinput.cpp
index 57b2df11c9..60c5eebb86 100644
--- a/tests/auto/qtquick2/qquicktextinput/tst_qquicktextinput.cpp
+++ b/tests/auto/qtquick2/qquicktextinput/tst_qquicktextinput.cpp
@@ -1261,11 +1261,8 @@ void tst_qquicktextinput::horizontalAlignment_RightToLeft()
// redundant as an actual input method may take care of it.
{ QInputMethodEvent ev; QGuiApplication::sendEvent(qGuiApp->inputPanel()->inputItem(), &ev); }
-#ifdef Q_OS_MAC
// empty text with implicit alignment follows the system locale-based
// keyboard input direction from QGuiApplication::keyboardInputDirection
- QEXPECT_FAIL("", "QTBUG-18040", Abort);
-#endif
textInput->setText("");
QCOMPARE(textInput->hAlign(), QGuiApplication::keyboardInputDirection() == Qt::LeftToRight ?
QQuickTextInput::AlignLeft : QQuickTextInput::AlignRight);
@@ -1277,10 +1274,6 @@ void tst_qquicktextinput::horizontalAlignment_RightToLeft()
QCOMPARE(textInput->hAlign(), QQuickTextInput::AlignRight);
QVERIFY(-textInputPrivate->hscroll > canvas.width()/2);
-
-#ifdef Q_OS_MAC
- QEXPECT_FAIL("", "QTBUG-18040", Abort); // alignment of TextInput with no text set to it
-#endif
QString componentStr = "import QtQuick 2.0\nTextInput {}";
QDeclarativeComponent textComponent(&engine);
textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
@@ -2666,6 +2659,9 @@ void tst_qquicktextinput::cursorRectangleSize()
QCOMPARE(cursorRectFromItem, cursorRectFromPositionToRectangle.toRect());
// item-canvas transform and input item transform match
+#ifdef Q_OS_MAC
+ QEXPECT_FAIL("","QTBUG-22966", Abort);
+#endif
QCOMPARE(QQuickItemPrivate::get(textInput)->itemToCanvasTransform(), qApp->inputPanel()->inputItemTransform());
// input panel cursorRectangle property and tranformed item cursor rectangle match
@@ -3084,14 +3080,14 @@ void tst_qquicktextinput::undo_keypressevents_data()
QStringList expectedString;
keys << "AFRAID"
- << Qt::Key_Home
+ << QKeySequence::MoveToStartOfLine
<< "VERY"
<< Qt::Key_Left
<< Qt::Key_Left
<< Qt::Key_Left
<< Qt::Key_Left
<< "BE"
- << Qt::Key_End
+ << QKeySequence::MoveToEndOfLine
<< "!";
expectedString << "BEVERYAFRAID!";
@@ -3105,7 +3101,7 @@ void tst_qquicktextinput::undo_keypressevents_data()
QStringList expectedString;
// inserting '1234'
- keys << "1234" << Qt::Key_Home
+ keys << "1234" << QKeySequence::MoveToStartOfLine
// skipping '12'
<< Qt::Key_Right << Qt::Key_Right
// selecting '34'
@@ -3123,7 +3119,7 @@ void tst_qquicktextinput::undo_keypressevents_data()
// inserting 'AB12'
keys << "AB12"
- << Qt::Key_Home
+ << QKeySequence::MoveToStartOfLine
// selecting 'AB'
<< (Qt::Key_Right | Qt::ShiftModifier) << (Qt::Key_Right | Qt::ShiftModifier)
<< Qt::Key_Delete
@@ -3197,9 +3193,9 @@ void tst_qquicktextinput::undo_keypressevents_data()
QStringList expectedString;
// inserting '123'
- keys << "123" << Qt::Key_Home
+ keys << "123" << QKeySequence::MoveToStartOfLine
// selecting '123'
- << (Qt::Key_End | Qt::ShiftModifier)
+ << QKeySequence::SelectEndOfLine
// overwriting '123' with 'ABC'
<< "ABC";