diff options
| author | Ahmad Samir <a.samirh78@gmail.com> | 2022-10-12 17:49:04 +0200 |
|---|---|---|
| committer | Ahmad Samir <a.samirh78@gmail.com> | 2022-10-14 23:48:55 +0200 |
| commit | 64e3f48e3b7d2a7b71a7e46cbba2e14ebf9e9471 (patch) | |
| tree | 6fcedc53e47d866e2ff0d72ea078fc813afc83d9 /src | |
| parent | 39bd9d45baf47d2a6bab9f9e7e5c865c788d5a4b (diff) | |
QDir: use QFileInfo::exists() directly
static QFile::exists() calls static QFileInfo::exists().
Mention QFileInfo::exists in the QDir docs details.
Change-Id: I35ba9b00f33376a4ceb2f27ab587d368a95e4fe5
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src')
| -rw-r--r-- | src/corelib/io/qdir.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/corelib/io/qdir.cpp b/src/corelib/io/qdir.cpp index d18f409983d..5f6ed307c56 100644 --- a/src/corelib/io/qdir.cpp +++ b/src/corelib/io/qdir.cpp @@ -486,8 +486,8 @@ inline void QDirPrivate::initFileEngine() \snippet code/src_corelib_io_qdir.cpp 4 - (We could also use the static convenience function - QFile::exists().) + (We could also use one of the static convenience functions + QFileInfo::exists() or QFile::exists().) Traversing directories and reading a file: @@ -1882,7 +1882,7 @@ bool QDir::exists(const QString &name) const qWarning("QDir::exists: Empty or null file name"); return false; } - return QFile::exists(filePath(name)); + return QFileInfo::exists(filePath(name)); } /*! |
