From 9149f31aeaf3fce0c5ba5c20da0b9f2b56368abb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20Martins?= Date: Tue, 26 Mar 2013 11:47:38 +0000 Subject: 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 Reviewed-by: Joerg Bornemann --- src/widgets/dialogs/qfileinfogatherer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/widgets/dialogs/qfileinfogatherer.cpp') 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()) { -- cgit v1.2.3