ProjectExplorer: Better fallback for displayed names

... for inaccessible files. We have a file path already, an empty
string is worse.

Change-Id: I92eefe0a4b45e5cbf3dd28a73211530296a66cbc
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
hjk
2022-12-14 14:41:32 +01:00
parent 4ea60589bb
commit 31af32533e

View File

@@ -430,7 +430,7 @@ DeviceManager::DeviceManager(bool isInstance) : d(std::make_unique<DeviceManager
deviceHooks.deviceDisplayName = [](const FilePath &filePath) { deviceHooks.deviceDisplayName = [](const FilePath &filePath) {
auto device = DeviceManager::deviceForPath(filePath); auto device = DeviceManager::deviceForPath(filePath);
QTC_ASSERT(device, return QString()); QTC_ASSERT(device, return filePath.toUserOutput());
return device->displayName(); return device->displayName();
}; };