diff options
Diffstat (limited to 'src/corelib/io')
-rw-r--r-- | src/corelib/io/qfileinfo.cpp | 4 | ||||
-rw-r--r-- | src/corelib/io/qfileinfo.h | 3 | ||||
-rw-r--r-- | src/corelib/io/qfilesystemwatcher_win.cpp | 1 |
3 files changed, 4 insertions, 4 deletions
diff --git a/src/corelib/io/qfileinfo.cpp b/src/corelib/io/qfileinfo.cpp index 8bf7115b58..7ed840052e 100644 --- a/src/corelib/io/qfileinfo.cpp +++ b/src/corelib/io/qfileinfo.cpp @@ -308,6 +308,8 @@ QDateTime &QFileInfoPrivate::getFileTime(QAbstractFileEngine::FileTime request) refreshes the file information: refresh(). If you want to switch off a QFileInfo's caching and force it to access the file system every time you request information from it call setCaching(false). + If you want to make sure that all information is read from the + file system, use stat(). \sa QDir, QFile */ @@ -1509,8 +1511,6 @@ void QFileInfo::setCaching(bool enable) } /*! - \internal - Reads all attributes from the file system. This is useful when information about the file system is collected in a diff --git a/src/corelib/io/qfileinfo.h b/src/corelib/io/qfileinfo.h index 160c8ea26a..669a6bcea1 100644 --- a/src/corelib/io/qfileinfo.h +++ b/src/corelib/io/qfileinfo.h @@ -175,13 +175,12 @@ public: bool caching() const; void setCaching(bool on); + void stat(); protected: QSharedDataPointer<QFileInfoPrivate> d_ptr; private: - friend class QFileInfoGatherer; - void stat(); QFileInfoPrivate* d_func(); inline const QFileInfoPrivate* d_func() const { 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; |