summaryrefslogtreecommitdiffstats
path: root/tests/auto/sql/kernel/qsqldatabase/tst_qsqldatabase.cpp
diff options
context:
space:
mode:
authorEdward Welbourne <edward.welbourne@qt.io>2023-02-14 14:02:58 +0100
committerEdward Welbourne <edward.welbourne@qt.io>2023-02-20 18:30:44 +0100
commitb73dafbf86f14c6559f663eeb8b2b0aab6cdc297 (patch)
treeade03f372dd51b63d9ca6ce8e54a13eac8df32a3 /tests/auto/sql/kernel/qsqldatabase/tst_qsqldatabase.cpp
parentb124171309b259d429bd064fe3bfdec148869ef4 (diff)
Move access to tzname[] to under the env.var access log
Replace qlocaltime.cpp's qt_tzname() with qTzName() in qtenvironmentvariables{_p.h,.cpp} so as to put the access to the standard library global under the control of the same lock as controls all Qt's calls to tzset() and functions that behave as if they called it. This avoids UB on access to the global during a call to any of these functions. Take care to use the lock only for the shortest time needed. This simplifies both callers and lets a QDTParser method escape to qdatetimeparser.cpp to become a simple local static function instead of a class method defined in a separate compilation unit. Change-Id: I5ddee5641f2ed7b5676ece10375a1d5232eb7f22 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'tests/auto/sql/kernel/qsqldatabase/tst_qsqldatabase.cpp')
0 files changed, 0 insertions, 0 deletions