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) {
// 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);
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(""));
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
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!";
QStringList expectedString;
// inserting '1234'
- keys << "1234" << Qt::Key_Home
+ keys << "1234" << QKeySequence::MoveToStartOfLine
// skipping '12'
<< Qt::Key_Right << Qt::Key_Right
// selecting '34'
// inserting 'AB12'
keys << "AB12"
- << Qt::Key_Home
+ << QKeySequence::MoveToStartOfLine
// selecting 'AB'
<< (Qt::Key_Right | Qt::ShiftModifier) << (Qt::Key_Right | Qt::ShiftModifier)
<< Qt::Key_Delete
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";