Utils: Fix result of fileNameWithPathComponents()

Combination of bf8bf1adc0 and d83f9d71cc broke
the resulting string.
Fixes tst_fileutils file name tests.

Change-Id: I69c485e52bbf76093b903b407ab2ff2f58d28a0d
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
Christian Stenger
2022-09-23 11:21:13 +02:00
parent d5412588fd
commit 805e536df6

View File

@@ -272,7 +272,7 @@ QString FilePath::fileNameWithPathComponents(int pathComponents) const
return fullPath.mid(component);
// If there are no more slashes before the found one, return the entire string
return displayName();
return toString();
}
/// \returns the base name of the file without the path.