From 2d0794cbc73a6913bea075804f232c4996d5fc4d Mon Sep 17 00:00:00 2001 From: Mitch Curtis Date: Mon, 27 Jul 2020 16:20:47 +0200 Subject: 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 --- tests/auto/controls/data/tst_spinbox.qml | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'tests') 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 { -- cgit v1.2.3