summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorAndre Hartmann <aha_1980@gmx.de>2019-04-28 14:08:49 +0200
committerAndré Hartmann <aha_1980@gmx.de>2019-04-29 07:00:43 +0000
commit673495d2eb1fe9cdf701351d75c2203c80ab6ba5 (patch)
tree2f24a5d2505defb20800323ba4ff579dcf65b18d /tests
parentb58c86eddd8fa3fb4a570c5aa2301b1278c4e13c (diff)
CAN Example: Fix entering invalid chars in CAN ID input
The old code returned Intermediate for invalid inputs (e.g. chars outside the A-F range or special characters), because input.toUInt() returned 0 for these cases. Fix that by checking ok from input.toUInt(&ok) first. To allow clearing an edit field containing valid input with backspace again, an additional isEmpty() check has to be added. Change-Id: I4ae28e35ca21611fc5f323b26cdeca75257f1352 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Diffstat (limited to 'tests')
0 files changed, 0 insertions, 0 deletions