forked from qt-creator/qt-creator
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>
This commit is contained in:
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user