diff options
author | Sérgio Martins <sergio.martins@kdab.com> | 2013-03-26 11:47:38 +0000 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-03-27 14:26:09 +0100 |
commit | 9149f31aeaf3fce0c5ba5c20da0b9f2b56368abb (patch) | |
tree | 9006a5c8825d11c5a30d2f4fc5ff0b8f3fdec87c /src/widgets/dialogs/qfileinfogatherer.cpp | |
parent | 5d12417c94579fcbed3beb40b03f4309e7a44e79 (diff) |
Windows: Fix the last file dialog bottleneck.
Went from taking 30 seconds to 2 seconds, on a SDCard with 10k files.
Windows file dialog does not resolve NTFS symlinks,
it just shows an empty icon, and the link name, not the target.
This allows for a big performance gain by reducing the number of
calls to GetFileAttributesEx() by checking the extension directly.
This also fixes the problems with the native file dialog, which
for some reason, is creating a QFileSystemModel too.
Task-number: QTBUG-13182
Change-Id: Ie2739765fd6c7daea64e3cf1d208ba9720bd39f2
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Diffstat (limited to 'src/widgets/dialogs/qfileinfogatherer.cpp')
-rw-r--r-- | src/widgets/dialogs/qfileinfogatherer.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/widgets/dialogs/qfileinfogatherer.cpp b/src/widgets/dialogs/qfileinfogatherer.cpp index e8da8aa651..0f12c2b80e 100644 --- a/src/widgets/dialogs/qfileinfogatherer.cpp +++ b/src/widgets/dialogs/qfileinfogatherer.cpp @@ -238,7 +238,7 @@ QExtendedInformation QFileInfoGatherer::getInfo(const QFileInfo &fileInfo) const #endif #ifdef Q_OS_WIN - if (fileInfo.isSymLink() && m_resolveSymlinks) { + if (m_resolveSymlinks && info.isSymLink(/* ignoreNtfsSymLinks = */ true)) { QFileInfo resolvedInfo(fileInfo.symLinkTarget()); resolvedInfo = resolvedInfo.canonicalFilePath(); if (resolvedInfo.exists()) { |