Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
6.3.1
-
None
Description
QFileSystemModel::isDir returns 'true' for a non-existent directory. This is not what e.g. QFileDialog expects. The attached example executes a QFileDialog, where a directory "DoesNotExist" is added to the history (aka "Recent places"). Press "Test" to show the file dialog, then show the popup of the "Look in" combo box. You will see the "DoesNotExist" in the list.
QUrlModel::addUrls (called by QFileDialogComboBox::showPopup) tries to skip the non-existent directory, but this does not work due to the behaviour of QFileSystemModel::isDir. Code snippets of QFileDialogComboBox::showPopup, QUrlModel::addUrls and QFileSystemModel::isDir are part of the attachment, search for "// <==" to find the relevant lines.