From 9bac0d7f4c574a88455771b88f078c0c10dd9b32 Mon Sep 17 00:00:00 2001 From: hjk Date: Wed, 14 Dec 2022 08:27:35 +0100 Subject: [PATCH] Utils: Be a bit more informative in failing FilePath accesses Change-Id: I2e30998d2d5cd3159b28996d1102c65cbb9ad03b Reviewed-by: Jarek Kobus Reviewed-by: Eike Ziller --- src/libs/utils/filepath.cpp | 2 +- src/plugins/projectexplorer/devicesupport/devicemanager.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/libs/utils/filepath.cpp b/src/libs/utils/filepath.cpp index 9dde444f7a6..98d5e71ca75 100644 --- a/src/libs/utils/filepath.cpp +++ b/src/libs/utils/filepath.cpp @@ -873,7 +873,7 @@ DeviceFileAccess *FilePath::fileAccess() const static DeviceFileAccess dummy; DeviceFileAccess *access = s_deviceHooks.fileAccess(*this); - QTC_ASSERT(access, return &dummy); + QTC_ASSERT(access, qDebug() << toString(); return &dummy); return access; } diff --git a/src/plugins/projectexplorer/devicesupport/devicemanager.cpp b/src/plugins/projectexplorer/devicesupport/devicemanager.cpp index 9dff261e2cd..10f71120b63 100644 --- a/src/plugins/projectexplorer/devicesupport/devicemanager.cpp +++ b/src/plugins/projectexplorer/devicesupport/devicemanager.cpp @@ -418,13 +418,13 @@ DeviceManager::DeviceManager(bool isInstance) : d(std::make_uniquefileAccess(); }; deviceHooks.environment = [](const FilePath &filePath) { auto device = DeviceManager::deviceForPath(filePath); - QTC_ASSERT(device, return Environment{}); + QTC_ASSERT(device, qDebug() << filePath.toString(); return Environment{}); return device->systemEnvironment(); };