summaryrefslogtreecommitdiffstats
path: root/src/corelib/thread/qthreadpool.cpp
diff options
context:
space:
mode:
authorEdward Welbourne <edward.welbourne@qt.io>2023-04-25 13:37:30 +0200
committerEdward Welbourne <edward.welbourne@qt.io>2023-05-04 14:06:08 +0200
commit7d7503948274e9cacdf3a7cea011ff8a5103bfa1 (patch)
treeae904088e89f04447d928a47bef966ff5ce7f156 /src/corelib/thread/qthreadpool.cpp
parent4c93b9c1d082842f2279869d9f289dad19155453 (diff)
Make default local time a static const
QDateTimeParser::fromString(), when parsing a date-time, uses the start of 1900, in local time, as its default date-time. (This is a bad choice and steadily getting worse.) This turns out to be somewhat expensive for some client code, so make it a static const so that we only compute it on the first call, as for getM{in,ax}imum(). The potential downside is that a change to system time zone won't be reflected in this value. However, any sane parse-format should require over-writing all fields of this initial value, in any case, so the issue is less severe for this default value than for the existing getM{in,ax}imum() statics. Change-Id: Iacfd827fe76c4e5fbdc5e5b6efefed13bc673af4 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/thread/qthreadpool.cpp')
0 files changed, 0 insertions, 0 deletions