diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2010-06-16 16:21:24 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2010-06-16 16:21:24 (GMT) |
commit | 7b30a66b2f16a8bf8828d26b7d0b193b5dffe713 (patch) | |
tree | 3ed1219e02bab53df871e7bf87bcf191c1a7534b /tests | |
parent | 65b05e330640a5e1920c61a4735cbc27a5ca3fe2 (diff) | |
parent | 6d178306f71564471cc08eb7dc98743c3752cac4 (diff) | |
download | Qt-7b30a66b2f16a8bf8828d26b7d0b193b5dffe713.zip Qt-7b30a66b2f16a8bf8828d26b7d0b193b5dffe713.tar.gz Qt-7b30a66b2f16a8bf8828d26b7d0b193b5dffe713.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/qt-qml:
Fix the N900 device orientation backend
Micro cleanup
Write TextInput.positionToRectangle docs.
Minor demo fixes
Fix autoScroll implementation
Move knowledge of QGraphicsObject out of qml engine
Stopping a flick resulted in the next click being consumed.
Enhance docs
Slight addition to the docs.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp | 1 | ||||
-rw-r--r-- | tests/auto/declarative/qmlvisual/qdeclarativetextinput/LineEdit.qml | 9 |
2 files changed, 5 insertions, 5 deletions
diff --git a/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp b/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp index 3143580..a55b42e 100644 --- a/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp +++ b/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp @@ -396,7 +396,6 @@ void tst_qdeclarativetextinput::positionAt() #endif // Check without autoscroll... - QEXPECT_FAIL("", "QTBUG-11127", Abort); textinputObject->setAutoScroll(false); pos = textinputObject->positionAt(textinputObject->width()/2); diff = abs(fm.width(textinputObject->text().left(pos))-textinputObject->width()/2); diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetextinput/LineEdit.qml b/tests/auto/declarative/qmlvisual/qdeclarativetextinput/LineEdit.qml index 69f57c6..e863262 100644 --- a/tests/auto/declarative/qmlvisual/qdeclarativetextinput/LineEdit.qml +++ b/tests/auto/declarative/qmlvisual/qdeclarativetextinput/LineEdit.qml @@ -30,13 +30,14 @@ Item { y: 5 //Below function implements all scrolling logic onCursorPositionChanged: { - if(cursorRect.x < leftMargin - textInp.x){//Cursor went off the front - textInp.x = leftMargin - Math.max(0, cursorRect.x); - }else if(cursorRect.x > parent.width - leftMargin - rightMargin - textInp.x){//Cusor went off the end - textInp.x = leftMargin - Math.max(0, cursorRect.x - (parent.width - leftMargin - rightMargin)); + if(cursorRectangle.x < leftMargin - textInp.x){//Cursor went off the front + textInp.x = leftMargin - Math.max(0, cursorRectangle.x); + }else if(cursorRectangle.x > parent.width - leftMargin - rightMargin - textInp.x){//Cusor went off the end + textInp.x = leftMargin - Math.max(0, cursorRectangle.x - (parent.width - leftMargin - rightMargin)); } } + autoScroll: false //It is preferable to implement your own scrolling text:"" horizontalAlignment: TextInput.AlignLeft font.pixelSize:15 |