Added indentation test for Qml

Change-Id: I15751d93dccba232455e6e85c4ac0c30c74be3af
Reviewed-on: http://codereview.qt-project.org/4650
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Bill King <bill.king@nokia.com>
This commit is contained in:
Christian Stenger
2011-09-12 11:07:54 +02:00
committed by Bill King
parent 5a0a44bf92
commit c36e017d40
2 changed files with 138 additions and 0 deletions
+11
View File
@@ -84,3 +84,14 @@ def waitForSignal(object, signal, timeout=30000):
beforeCount = signalObjects[realName]
installLazySignalHandler(object, signal, "callbackFunction")
waitFor("signalObjects[realName] > beforeCount", timeout)
def markText(editor, startPosition, endPosition):
cursor = editor.textCursor()
cursor.setPosition(startPosition)
cursor.movePosition(QTextCursor.StartOfLine)
editor.setTextCursor(cursor)
cursor.movePosition(QTextCursor.Right, QTextCursor.KeepAnchor, endPosition-startPosition)
cursor.movePosition(QTextCursor.EndOfLine, QTextCursor.KeepAnchor)
cursor.setPosition(endPosition, QTextCursor.KeepAnchor)
editor.setTextCursor(cursor)