diff options
author | Edward Welbourne <edward.welbourne@qt.io> | 2017-05-16 16:32:25 +0200 |
---|---|---|
committer | Edward Welbourne <edward.welbourne@qt.io> | 2017-06-13 11:27:49 +0000 |
commit | 748d87f28f87fd12b5a1e156025a92c32b73ae8e (patch) | |
tree | 2204fa96d8700c42d54ba22a013e7a66c05d07c9 /src/corelib/tools/qtimezone.cpp | |
parent | 4cb46e27fdf30d6db9f7720fd23f7e983c38edaa (diff) |
Tidy implementation and use of QDateTimeParser::setDigit()
The implementation did a validity check on data it then gave to
constructors that repeat the validity checks; so do the construction
first and use the cheaper instance isValid() methods instead.
Fixed local callers (but not QDateTimeEditPrivate::stepBy, the only
other caller) to actually attend to the return value; if the attempt
to set a field fails, it probably means the min is too low, or max too
high; and comparing the modified date-time against global min and max
makes no sense if it hasn't been revised anyway.
Change-Id: If4505c43c92e247445dcd10ac436b775c3ead4da
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/tools/qtimezone.cpp')
0 files changed, 0 insertions, 0 deletions