diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2011-03-28 16:37:37 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2011-03-28 16:37:37 (GMT) |
commit | d31089f55c8a17d715ee22d420c57eea708a0652 (patch) | |
tree | a2896abaf747470d64092a20f344bbcf16b76031 /tests/auto | |
parent | 2c8845bed37a9d81a21078bf95f8d6d2e6e8c0e8 (diff) | |
parent | e5a911351ae11376e6d86d70ddacd4016450ed6b (diff) | |
download | Qt-d31089f55c8a17d715ee22d420c57eea708a0652.zip Qt-d31089f55c8a17d715ee22d420c57eea708a0652.tar.gz Qt-d31089f55c8a17d715ee22d420c57eea708a0652.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 text selection with shift-click.
Diffstat (limited to 'tests/auto')
-rw-r--r-- | tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp b/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp index f62c2c5..04ecf91 100644 --- a/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp +++ b/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp @@ -1340,6 +1340,12 @@ void tst_qdeclarativetextedit::mouseSelection() else QVERIFY(str.isEmpty()); + // Clicking and shift to clicking between the same points should select the same text. + textEditObject->setCursorPosition(0); + QTest::mouseClick(canvas->viewport(), Qt::LeftButton, Qt::NoModifier, canvas->mapFromScene(QPoint(x1,y))); + QTest::mouseClick(canvas->viewport(), Qt::LeftButton, Qt::ShiftModifier, canvas->mapFromScene(QPoint(x2,y))); + QCOMPARE(textEditObject->selectedText(), str); + delete canvas; } @@ -1436,6 +1442,12 @@ void tst_qdeclarativetextedit::mouseSelectionMode() QVERIFY(str != text); } + // Clicking and shift to clicking between the same points should select the same text. + textEditObject->setCursorPosition(0); + QTest::mouseClick(canvas->viewport(), Qt::LeftButton, Qt::NoModifier, canvas->mapFromScene(QPoint(x1,y))); + QTest::mouseClick(canvas->viewport(), Qt::LeftButton, Qt::ShiftModifier, canvas->mapFromScene(QPoint(x2,y))); + QCOMPARE(textEditObject->selectedText(), str); + delete canvas; } |