Devices: Unify Port Gathering method

All devices that support it use the same mechanism to gather ports
so this patch removes the individual implementations in favor
of a single one in IDevice.cpp.

This patch also removes:
* canAutodetectPorts() as it was not used.
* Port::parseFrom...Output as they are not used anymore.

Change-Id: I8ecedec2d71e60985402387982c64311c5a651e6
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
Marcus Tillmanns
2023-04-05 11:15:02 +02:00
parent f5c41a7f83
commit 522de9bfd7
17 changed files with 23 additions and 182 deletions

View File

@@ -185,12 +185,6 @@ Utils::Port IosDevice::nextPort() const
return Utils::Port(m_lastPort);
}
bool IosDevice::canAutoDetectPorts() const
{
return true;
}
// IosDeviceManager
IosDeviceManager::TranslationMap IosDeviceManager::translationMap()

View File

@@ -36,7 +36,6 @@ public:
QString osVersion() const;
QString cpuArchitecture() const;
Utils::Port nextPort() const;
bool canAutoDetectPorts() const override;
static QString name();

View File

@@ -66,11 +66,6 @@ Utils::Port IosSimulator::nextPort() const
return Utils::Port(m_lastPort);
}
bool IosSimulator::canAutoDetectPorts() const
{
return true;
}
// IosDeviceType
IosDeviceType::IosDeviceType(IosDeviceType::Type type, const QString &identifier, const QString &displayName) :

View File

@@ -48,7 +48,6 @@ public:
ProjectExplorer::IDeviceWidget *createWidget() override;
Utils::Port nextPort() const;
bool canAutoDetectPorts() const override;
protected:
friend class IosSimulatorFactory;