summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhjk <hjk@qt.io>2017-08-07 16:14:35 +0200
committerhjk <hjk@qt.io>2017-08-07 14:36:16 +0000
commit17d6ed15ca94b4b75a731c0a85ce33c533c9692c (patch)
tree6d7b45ba0bcce0bb8bdd9bcf3eae925929565607
parent096253bf6ed14f185f7d4466a332456968c8f556 (diff)
downloadqt-creator-17d6ed15ca94b4b75a731c0a85ce33c533c9692c.tar.gz
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 <wolfgang.bremer@pelagicore.com> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
-rw-r--r--src/plugins/projectexplorer/devicesupport/deviceusedportsgatherer.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/plugins/projectexplorer/devicesupport/deviceusedportsgatherer.cpp b/src/plugins/projectexplorer/devicesupport/deviceusedportsgatherer.cpp
index 17aa4f2ba9..7115bb0de3 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());