diff options
author | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2020-07-29 20:12:26 +0200 |
---|---|---|
committer | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2020-08-10 13:17:01 +0200 |
commit | 3657405fe766d9aca719177a6f9614c4dc08c47e (patch) | |
tree | 376135b556ee583fa614d23649a3a7cc45d370f7 /src/corelib/io/qfilesystemwatcher_win.cpp | |
parent | 7b3a2f5e3d5f496036c4ea7e2fa3778fce848e57 (diff) |
QFileInfo: make stat method public
Forcing the reading of all file system attributes is generally useful in
multi-threaded applications, and has at least one more use case in Qt.
Using it in QFileSystemWatcher on Windows avoids several file system
accesses.
Task-number: QTBUG-41373
Change-Id: Ib3c3243fd083142393ad46d62f49cb4f7bfda17c
Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io>
Diffstat (limited to 'src/corelib/io/qfilesystemwatcher_win.cpp')
-rw-r--r-- | src/corelib/io/qfilesystemwatcher_win.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/corelib/io/qfilesystemwatcher_win.cpp b/src/corelib/io/qfilesystemwatcher_win.cpp index 482360658f..b131524614 100644 --- a/src/corelib/io/qfilesystemwatcher_win.cpp +++ b/src/corelib/io/qfilesystemwatcher_win.cpp @@ -372,6 +372,7 @@ QStringList QWindowsFileSystemWatcherEngine::addPaths(const QStringList &paths, normalPath.chop(1); } QFileInfo fileInfo(normalPath); + fileInfo.stat(); if (!fileInfo.exists()) continue; |