summaryrefslogtreecommitdiffstats
path: root/src/corelib/io/qlockfile_p.h
diff options
context:
space:
mode:
authorAhmad Samir <a.samirh78@gmail.com>2023-02-28 01:09:13 +0200
committerAhmad Samir <a.samirh78@gmail.com>2023-03-15 20:48:31 +0200
commita0e3da2625a39f16e2b0cdf187b5a4fd65eed855 (patch)
tree70475e41ef97e2dd2e07522ea986c4573db83e3d /src/corelib/io/qlockfile_p.h
parent779bdf481ca208c20cfabd02d02d74175b0624b9 (diff)
QLockFile: {set}StaleLockTime: use chrono first
This is similar to the tryLock() commit, making the chrono overloads the main methods, this way the lock time isn't limited by the size of int, but rather by std::chrono::milliseconds (which can be as up to int64_t). Task-number: QTBUG-110059 Change-Id: I8d1652748b16be2154233f7db57ed485bcab62c7 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/io/qlockfile_p.h')
-rw-r--r--src/corelib/io/qlockfile_p.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/corelib/io/qlockfile_p.h b/src/corelib/io/qlockfile_p.h
index 4eea312ef5..299b13b21a 100644
--- a/src/corelib/io/qlockfile_p.h
+++ b/src/corelib/io/qlockfile_p.h
@@ -53,8 +53,8 @@ public:
#else
int fileHandle = -1;
#endif
- // "int milliseconds" is big enough for 24 days
- int staleLockTime = 30 * 1000; // 30 seconds
+
+ std::chrono::milliseconds staleLockTime = std::chrono::seconds{30};
QLockFile::LockError lockError = QLockFile::NoError;
bool isLocked = false;