Fix that ".." was no longer cleaned in file system locator filter

Amends 66bf957618

Fixes: QTCREATORBUG-26368
Change-Id: I0b90b1a6b6d4bd1bdbf135f0447702d6a85bb9e4
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
This commit is contained in:
Eike Ziller
2021-10-06 10:06:10 +02:00
parent d63b8b0bb7
commit 9ca3546e59

View File

@@ -176,8 +176,9 @@ void FileSystemFilter::accept(LocatorFilterEntry selection,
{ {
Q_UNUSED(selectionLength) Q_UNUSED(selectionLength)
if (selection.filePath.isDir()) { if (selection.filePath.isDir()) {
const QString value = shortcutString() + ' ' const QString value
+ selection.filePath.absoluteFilePath().toUserOutput() + '/'; = shortcutString() + ' '
+ selection.filePath.absoluteFilePath().cleanPath().pathAppended("/").toUserOutput();
*newText = value; *newText = value;
*selectionStart = value.length(); *selectionStart = value.length();
} else { } else {