diff options
author | Maks Naumov <maksqwe1@ukr.net> | 2015-10-20 07:54:36 +0300 |
---|---|---|
committer | Maks Naumov <maksqwe1@ukr.net> | 2015-10-20 06:45:57 +0000 |
commit | d2648d5f3f2c9315813dddfdc11110244f0562b9 (patch) | |
tree | 7c65f48102232c120dd37b6632c843262720151e /src/widgets/dialogs/qfilesystemmodel.cpp | |
parent | bfb6a8cd44978874a6e80db2c80532dbaf2ff380 (diff) |
QFileSystemModelPrivate::name(): avoid the double-lookup
Change-Id: I67507248220fbbddc67ab60ecb1933e1fbacf5fd
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Diffstat (limited to 'src/widgets/dialogs/qfilesystemmodel.cpp')
-rw-r--r-- | src/widgets/dialogs/qfilesystemmodel.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/widgets/dialogs/qfilesystemmodel.cpp b/src/widgets/dialogs/qfilesystemmodel.cpp index 2d8b8fadb1..70df7f305f 100644 --- a/src/widgets/dialogs/qfilesystemmodel.cpp +++ b/src/widgets/dialogs/qfilesystemmodel.cpp @@ -796,8 +796,7 @@ QString QFileSystemModelPrivate::name(const QModelIndex &index) const #endif !resolvedSymLinks.isEmpty() && dirNode->isSymLink(/* ignoreNtfsSymLinks = */ true)) { QString fullPath = QDir::fromNativeSeparators(filePath(index)); - if (resolvedSymLinks.contains(fullPath)) - return resolvedSymLinks.value(fullPath); + return resolvedSymLinks.value(fullPath, dirNode->fileName); } return dirNode->fileName; } |