ProjectExplorer: Introduce a setter for IDevice origin and id

They are not completely orthogonal, so use one function for
now.

This is the step towards streamlining the IDevice::ctor/create
lines of functions.

Change-Id: I1fe9144c45c7da0c9dcbda3bf424e976e0519cd6
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
hjk
2019-01-14 16:57:51 +01:00
parent 5dbaf387ba
commit 3f3eb40417
10 changed files with 19 additions and 17 deletions

View File

@@ -79,9 +79,9 @@ namespace Ios {
namespace Internal {
IosDevice::IosDevice()
: IDevice(IDevice::AutoDetected, Constants::IOS_DEVICE_ID),
m_lastPort(Constants::IOS_DEVICE_PORT_START)
: m_lastPort(Constants::IOS_DEVICE_PORT_START)
{
setupId(IDevice::AutoDetected, Constants::IOS_DEVICE_ID);
setType(Constants::IOS_DEVICE_TYPE);
setDisplayName(IosDevice::name());
setMachineType(IDevice::Hardware);
@@ -95,9 +95,9 @@ IosDevice::IosDevice()
IosDevice::IosDevice(const IosDevice &other) = default;
IosDevice::IosDevice(const QString &uid)
: IDevice(IDevice::AutoDetected, Core::Id(Constants::IOS_DEVICE_ID).withSuffix(uid)),
m_lastPort(Constants::IOS_DEVICE_PORT_START)
: m_lastPort(Constants::IOS_DEVICE_PORT_START)
{
setupId(IDevice::AutoDetected, Core::Id(Constants::IOS_DEVICE_ID).withSuffix(uid));
setType(Constants::IOS_DEVICE_TYPE);
setDisplayName(IosDevice::name());
setMachineType(IDevice::Hardware);