summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel/qtimer.cpp
diff options
context:
space:
mode:
authorAhmad Samir <a.samirh78@gmail.com>2023-03-18 14:41:52 +0200
committerAhmad Samir <a.samirh78@gmail.com>2023-07-22 23:29:31 +0300
commit67129ef9cd946837cec6118c9e6e5a03b7eae342 (patch)
tree282f1b9f27bf7c9182c8debafdef318a72b50069 /src/corelib/kernel/qtimer.cpp
parent6bb61f7e89e1b81e6fb1d93fa67a12d4541c664f (diff)
QLocaleData: change validateChars() to return validation State
Instead of returning just bool, return a result struct {State, CharBuff}, a State is useful as it can have an Intermediate state where the input isn't Acceptable yet, but not Invalid as such. The example from the linked bug is in tst_QIntValidator::validateFrench(), a string "1 ", which can be interpretted as a number with a group separator, but the input shouldn't end with a group separator (changing the unittest will be done as part of a separate commit). CharBuff (QVarLengthArray<char, 256>) replaces the QByteArray input parameter; a QVarLengthArray means no heap allocation in typical use-cases with input text < 256 characters to validate. This required minimum changes (QVLA doesn't have startsWith, replaced by comparing with buff[0]; and for converting to double, wrapped it in a QBAV). Task-number: QTBUG-111371 Change-Id: I4e0eb612d470ef03faf52031ddfe9c4bdb31e1e1 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Diffstat (limited to 'src/corelib/kernel/qtimer.cpp')
0 files changed, 0 insertions, 0 deletions