diff options
Diffstat (limited to 'src/widgets/dialogs/qfilesystemmodel.cpp')
-rw-r--r-- | src/widgets/dialogs/qfilesystemmodel.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/widgets/dialogs/qfilesystemmodel.cpp b/src/widgets/dialogs/qfilesystemmodel.cpp index 0db06e9b71..c083b0eff1 100644 --- a/src/widgets/dialogs/qfilesystemmodel.cpp +++ b/src/widgets/dialogs/qfilesystemmodel.cpp @@ -397,8 +397,11 @@ QFileSystemModelPrivate::QFileSystemNode *QFileSystemModelPrivate::node(const QS if (absolutePath.endsWith(QLatin1Char('/'))) trailingSeparator = QLatin1String("\\"); int r = 0; - QFileSystemModelPrivate::QFileSystemNode *rootNode = const_cast<QFileSystemModelPrivate::QFileSystemNode*>(&root); - if (!root.children.contains(host.toLower())) { + auto rootNode = const_cast<QFileSystemModelPrivate::QFileSystemNode*>(&root); + auto it = root.children.constFind(host); + if (it != root.children.cend()) { + host = it.key(); // Normalize case for lookup in visibleLocation() + } else { if (pathElements.count() == 1 && !absolutePath.endsWith(QLatin1Char('/'))) return rootNode; QFileInfo info(host); |