diff options
Diffstat (limited to 'tests/auto/qml/qmlcppcodegen/data/returnAfterReject.qml')
-rw-r--r-- | tests/auto/qml/qmlcppcodegen/data/returnAfterReject.qml | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/auto/qml/qmlcppcodegen/data/returnAfterReject.qml b/tests/auto/qml/qmlcppcodegen/data/returnAfterReject.qml new file mode 100644 index 0000000000..e0b85eb270 --- /dev/null +++ b/tests/auto/qml/qmlcppcodegen/data/returnAfterReject.qml @@ -0,0 +1,15 @@ +import QtQml + +QtObject { + id: remaining + + property int bar: 0 + + Component.onCompleted: { + let remainingTime = 123 + if (remainingTime < 0) { + remainingTime += 24 * 60 * 60 + } + remaining.bar = isNaN(remainingTime) ? 0 : remainingTime + } +} |