From 17d6ed15ca94b4b75a731c0a85ce33c533c9692c Mon Sep 17 00:00:00 2001 From: hjk Date: Mon, 7 Aug 2017 16:14:35 +0200 Subject: [PATCH] ProjectExplorer: Fail more gracefully ... when SomeDevice::portsGatheringMethod() is not implemented. That's more a debugging help than an actual solution for the user. Change-Id: I2ab97f6fb00c4d5cfebb60e58cf948d725f3d6a6 Reviewed-by: Wolfgang Bremer Reviewed-by: Christian Kandeler --- .../devicesupport/deviceusedportsgatherer.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/plugins/projectexplorer/devicesupport/deviceusedportsgatherer.cpp b/src/plugins/projectexplorer/devicesupport/deviceusedportsgatherer.cpp index 17aa4f2ba9d..7115bb0de3c 100644 --- a/src/plugins/projectexplorer/devicesupport/deviceusedportsgatherer.cpp +++ b/src/plugins/projectexplorer/devicesupport/deviceusedportsgatherer.cpp @@ -65,8 +65,9 @@ DeviceUsedPortsGatherer::~DeviceUsedPortsGatherer() void DeviceUsedPortsGatherer::start(const IDevice::ConstPtr &device) { - QTC_ASSERT(!d->connection, return); - QTC_ASSERT(device && device->portsGatheringMethod(), return); + QTC_ASSERT(!d->connection, emit error("No connection"); return); + QTC_ASSERT(device && device->portsGatheringMethod(), + emit error("Not implemented"); return); d->device = device; d->connection = QSsh::acquireConnection(device->sshParameters());