summaryrefslogtreecommitdiffstats
path: root/src/corelib/io
diff options
context:
space:
mode:
authorIgor Kushnir <igorkuo@gmail.com>2021-12-07 19:00:05 +0200
committerIgor Kushnir <igorkuo@gmail.com>2021-12-11 01:30:07 +0200
commit4229de1685dd0a671f332faf7bfed3ffe5cd8a87 (patch)
treefeb775651a04c6b1e21ea8ff2adc3eb97d1e09d6 /src/corelib/io
parentb00404abffdc423c00e35ba53ca6a8bdfa91b51d (diff)
Remove redundant QDir::fromNativeSeparators() call
QFileSystemEntry::QFileSystemEntry(const QString &filePath) already calls this function. Calling it repeatedly changes nothing but wastes CPU time. Neither the line modified in this commit nor the QFileSystemEntry's constructor have been changed since 2011's commit "Initial import from the monolithic Qt." Other constructor overloads of QFileInfoPrivate don't call QDir::fromNativeSeparators(). Change-Id: I01e54662efd96e87c4a686369dc0b265b47e5938 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/io')
-rw-r--r--src/corelib/io/qfileinfo_p.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/io/qfileinfo_p.h b/src/corelib/io/qfileinfo_p.h
index 333ea70adc..8b02c8ab8b 100644
--- a/src/corelib/io/qfileinfo_p.h
+++ b/src/corelib/io/qfileinfo_p.h
@@ -101,7 +101,7 @@ public:
cache_enabled(copy.cache_enabled), fileFlags(0), fileSize(0)
{}
inline QFileInfoPrivate(const QString &file)
- : fileEntry(QDir::fromNativeSeparators(file)),
+ : fileEntry(file),
fileEngine(QFileSystemEngine::resolveEntryAndCreateLegacyEngine(fileEntry, metaData)),
cachedFlags(0),
#ifndef QT_NO_FSFILEENGINE