DeviceSupport: Make errors translatable

Change-Id: Ieccb48cb5335e8eace4990e52f93ea431c7085de
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
Marcus Tillmanns
2023-10-11 13:27:45 +02:00
parent 2a84b9f02b
commit 520cbfa39a

View File

@@ -420,12 +420,12 @@ DeviceManager::DeviceManager(bool isInstance) : d(std::make_unique<DeviceManager
IDevice::ConstPtr device = DeviceManager::deviceForPath(filePath);
if (!device) {
return make_unexpected(
QString("No device found for path \"%1\"").arg(filePath.toUserOutput()));
Tr::tr("No device found for path \"%1\"").arg(filePath.toUserOutput()));
}
DeviceFileAccess *fileAccess = device->fileAccess();
if (!fileAccess) {
return make_unexpected(
QString("No file access for device \"%1\"").arg(device->displayName()));
Tr::tr("No file access for device \"%1\"").arg(device->displayName()));
}
return fileAccess;
};