diff options
Diffstat (limited to 'src/widgets/dialogs')
-rw-r--r-- | src/widgets/dialogs/qfilesystemmodel.cpp | 7 | ||||
-rw-r--r-- | src/widgets/dialogs/qmessagebox.cpp | 2 |
2 files changed, 6 insertions, 3 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); diff --git a/src/widgets/dialogs/qmessagebox.cpp b/src/widgets/dialogs/qmessagebox.cpp index 4e7a4a65e3..be6b4a2398 100644 --- a/src/widgets/dialogs/qmessagebox.cpp +++ b/src/widgets/dialogs/qmessagebox.cpp @@ -2046,7 +2046,7 @@ int QMessageBoxPrivate::showOldMessageBox(QWidget *parent, QMessageBox::Icon ico void QMessageBoxPrivate::retranslateStrings() { #if QT_CONFIG(textedit) - if (detailsButton) + if (detailsButton && detailsText) detailsButton->setLabel(detailsText->isHidden() ? ShowLabel : HideLabel); #endif } |