diff options
author | Mitch Curtis <mitch.curtis@qt.io> | 2020-07-27 16:20:47 +0200 |
---|---|---|
committer | Mitch Curtis <mitch.curtis@qt.io> | 2020-08-20 23:44:46 +0200 |
commit | 2d0794cbc73a6913bea075804f232c4996d5fc4d (patch) | |
tree | 932d9f927bce644e1df8d6c32d2b217e262ab086 /tests | |
parent | 70686007ce8c5f237e3319525682bbb85c99c49e (diff) |
QQuickSpinBox: fix another "function expressions as statements" warning
This amends d5fbbddd7794265f24d392d33c4874ac756cb9c9 by also fixing
valueFromText().
Task-number: QTBUG-64151
Pick-to: 5.15
Change-Id: I02b053bb4d4579e86eaaa2279826f3b103800fdf
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/controls/data/tst_spinbox.qml | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/auto/controls/data/tst_spinbox.qml b/tests/auto/controls/data/tst_spinbox.qml index a5c40cd3..40277875 100644 --- a/tests/auto/controls/data/tst_spinbox.qml +++ b/tests/auto/controls/data/tst_spinbox.qml @@ -549,6 +549,12 @@ TestCase { compare(valueFromTextCalls, data.editable ? 3 : 0) } + function test_callDefaultValueFromText() { + var control = createTemporaryObject(spinBox, testCase) + verify(control) + compare(control.valueFromText("123", control.locale), 123) + } + function test_autoRepeat() { var control = createTemporaryObject(spinBox, testCase) verify(control) @@ -659,6 +665,12 @@ TestCase { } } + function test_callDefaultTextFromValue() { + var control = createTemporaryObject(spinBox, testCase) + verify(control) + compare(control.textFromValue(123, control.locale), "123") + } + Component { id: overriddenSpinBox SpinBox { |