diff options
author | J-P Nurmi <jpnurmi@qt.io> | 2017-10-12 11:48:59 +0200 |
---|---|---|
committer | J-P Nurmi <jpnurmi@qt.io> | 2017-10-12 11:48:59 +0200 |
commit | b311ed261a1176c52e68bf8b23bd4040ac12c7c0 (patch) | |
tree | 8ae99a01cb656d564ac288035516cf5101706a18 /tests/auto | |
parent | 50576aeb67e1470c9c5d2b52650bede1aa6b5697 (diff) | |
parent | 0007db13236fcee4ca90b885a67cc7de0f40836d (diff) |
Merge remote-tracking branch 'origin/5.9' into 5.10
Conflicts:
.qmake.conf
src/quicktemplates2/qquickbuttongroup.cpp
src/quicktemplates2/qquickoverlay.cpp
tests/auto/controls/data/tst_buttongroup.qml
Change-Id: Iae23aaf039c6095007966475294e93220dbead84
Diffstat (limited to 'tests/auto')
-rw-r--r-- | tests/auto/controls/data/tst_buttongroup.qml | 32 | ||||
-rw-r--r-- | tests/auto/controls/data/tst_combobox.qml | 2 | ||||
-rw-r--r-- | tests/auto/controls/data/tst_scrollview.qml | 25 |
3 files changed, 58 insertions, 1 deletions
diff --git a/tests/auto/controls/data/tst_buttongroup.qml b/tests/auto/controls/data/tst_buttongroup.qml index cbbaec5a..7d981dd3 100644 --- a/tests/auto/controls/data/tst_buttongroup.qml +++ b/tests/auto/controls/data/tst_buttongroup.qml @@ -402,4 +402,36 @@ TestCase { compare(button2.checked, true) compare(group.checkedButton, null) } + + Component { + id: checkedButtonColumn + Column { + id: column + ButtonGroup { buttons: column.children } + Repeater { + id: repeater + delegate: Button { + checkable: true + text: modelData + onClicked: listModel.remove(index) + } + model: ListModel { + id: listModel + Component.onCompleted: { + for (var i = 0; i < 10; ++i) + append({text: i}) + } + } + } + } + } + + function test_checkedButtonDestroyed() { + var column = createTemporaryObject(checkedButtonColumn, testCase) + verify(column) + + waitForRendering(column) + mouseClick(column.children[0]) + wait(0) // don't crash (QTBUG-62946, QTBUG-63470) + } } diff --git a/tests/auto/controls/data/tst_combobox.qml b/tests/auto/controls/data/tst_combobox.qml index bc110de6..7bc78896 100644 --- a/tests/auto/controls/data/tst_combobox.qml +++ b/tests/auto/controls/data/tst_combobox.qml @@ -699,7 +699,7 @@ TestCase { } function test_mouse() { - var control = createTemporaryObject(comboBox, testCase, {model: 3}) + var control = createTemporaryObject(comboBox, testCase, {model: 3, hoverEnabled: false}) verify(control) var activatedSpy = signalSpy.createObject(control, {target: control, signalName: "activated"}) diff --git a/tests/auto/controls/data/tst_scrollview.qml b/tests/auto/controls/data/tst_scrollview.qml index c0b1a401..80110b5a 100644 --- a/tests/auto/controls/data/tst_scrollview.qml +++ b/tests/auto/controls/data/tst_scrollview.qml @@ -129,6 +129,16 @@ TestCase { } } + Component { + id: scrollableTextArea + ScrollView { + TextArea { + text: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas id dignissim ipsum. Nam molestie nisl turpis." + wrapMode: TextArea.WordWrap + } + } + } + function test_scrollBars() { var control = createTemporaryObject(scrollView, testCase, {width: 200, height: 200}) verify(control) @@ -339,4 +349,19 @@ TestCase { } compare(horizontal.position, 0.0) } + + function test_textArea() { + // TODO: verify no binding loop warnings (QTBUG-62325) + var control = createTemporaryObject(scrollableTextArea, testCase) + verify(control) + + var flickable = control.contentItem + verify(flickable && flickable.hasOwnProperty("contentX")) + + var textArea = flickable.contentItem.children[0] + verify(textArea && textArea.hasOwnProperty("text")) + + compare(control.contentWidth, flickable.contentWidth) + compare(control.contentHeight, flickable.contentHeight) + } } |