summaryrefslogtreecommitdiffstats
path: root/examples/widgets/doc/src
diff options
context:
space:
mode:
authorŁukasz Matysiak <lukasz.matysiak@qt.io>2024-05-14 18:09:07 +0200
committerŁukasz Matysiak <lukasz.matysiak@qt.io>2024-05-16 08:51:53 +0200
commit88cb405514270a320d2993e8fb1c7b7b62646112 (patch)
tree76e5046b16b196a2cd1f7336ab1b980984c05662 /examples/widgets/doc/src
parent785a5e6eb4745dc3219cc33dc5ea2e671a40b5f3 (diff)
Make tst_QFileInfo::setFileTimes more robust
There are some systems that do not support millisecond resolution in timestamps. An example of such system is VxWorks. POSIX2008 demands that `stat` contains an `st_mtim` field of type `timespec`. That field holds modification time with a nanosecond resolution. VxWorks reports _POSIX_VERSION as 200112. The `stat` struct does not contain `st_mtim`, but rather an `st_mtime` which holds a `time_t` which contains seconds. This leads to setFileTimes failing, because the test tries to save the current datetime as the modification time of a file, but the ms part is cut off. Fix the problem by checking if the timestamp read back from the filesystem contains milliseconds and only check it if it's not zero. Pick-to: 6.7 Task-number: QTBUG-115777 Change-Id: I8c8a3b1c8e97955f13f059bcebf66d1b5af174fe Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'examples/widgets/doc/src')
0 files changed, 0 insertions, 0 deletions