diff options
author | Mitch Curtis <mitch.curtis@qt.io> | 2017-07-07 14:34:22 +0200 |
---|---|---|
committer | Mitch Curtis <mitch.curtis@qt.io> | 2017-07-07 13:42:51 +0000 |
commit | 8bc2feb498cbbeafe0de52cda929ef7a881c0351 (patch) | |
tree | d239e3edffff77a79252fb9fcd2679f0a532c362 /tests | |
parent | cca6e8e3bd80824ff5aa3e17995a5b46ad48be28 (diff) |
Drawer: ignore and warn about invalid edge values
This fixes an issue where an application would crash when opening a
drawer by dragging it after an invalid edge value had been set.
Task-number: QTBUG-61843
Change-Id: Ie9b9ea0276b356b92927b858f2be355bfc042afb
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/controls/data/tst_drawer.qml | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/auto/controls/data/tst_drawer.qml b/tests/auto/controls/data/tst_drawer.qml index 11a57e2f..a33a4bf0 100644 --- a/tests/auto/controls/data/tst_drawer.qml +++ b/tests/auto/controls/data/tst_drawer.qml @@ -73,6 +73,16 @@ TestCase { compare(control.parent, ApplicationWindow.overlay) } + function test_invalidEdge() { + var control = createTemporaryObject(drawer, testCase) + compare(control.edge, Qt.LeftEdge) + + // Test an invalid value - it should warn and ignore it. + ignoreWarning(Qt.resolvedUrl("tst_drawer.qml") + ":65:9: QML Drawer: invalid edge value - valid values are: Qt.TopEdge, Qt.LeftEdge, Qt.RightEdge, Qt.BottomEdge") + control.edge = Drawer.Right + compare(control.edge, Qt.LeftEdge) + } + Component { id: rectDrawer |