forked from qt-creator/qt-creator
iOS: Code cosmetics
Remove unused functions and declarations, brace style, empty lines, ... Change-Id: I1afe90484879fa93bb1feaa25d12cd4794aa0234 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -538,16 +538,6 @@ void IosDeviceManager::updateAvailableDevices(const QStringList &devices)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
IosDevice::ConstPtr IosKitAspect::device(Kit *kit)
|
|
||||||
{
|
|
||||||
if (!kit)
|
|
||||||
return IosDevice::ConstPtr();
|
|
||||||
IDevice::ConstPtr dev = DeviceKitAspect::device(kit);
|
|
||||||
IosDevice::ConstPtr res = dev.dynamicCast<const IosDevice>();
|
|
||||||
return res;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Factory
|
// Factory
|
||||||
|
|
||||||
IosDeviceFactory::IosDeviceFactory()
|
IosDeviceFactory::IosDeviceFactory()
|
||||||
|
@@ -36,9 +36,6 @@
|
|||||||
#include <QStringList>
|
#include <QStringList>
|
||||||
#include <QTimer>
|
#include <QTimer>
|
||||||
|
|
||||||
namespace ProjectExplorer{
|
|
||||||
class Kit;
|
|
||||||
}
|
|
||||||
namespace Ios {
|
namespace Ios {
|
||||||
class IosConfigurations;
|
class IosConfigurations;
|
||||||
|
|
||||||
@@ -61,7 +58,6 @@ public:
|
|||||||
void fromMap(const QVariantMap &map) override;
|
void fromMap(const QVariantMap &map) override;
|
||||||
QVariantMap toMap() const override;
|
QVariantMap toMap() const override;
|
||||||
QString uniqueDeviceID() const;
|
QString uniqueDeviceID() const;
|
||||||
IosDevice(const QString &uid);
|
|
||||||
QString osVersion() const;
|
QString osVersion() const;
|
||||||
Utils::Port nextPort() const;
|
Utils::Port nextPort() const;
|
||||||
bool canAutoDetectPorts() const override;
|
bool canAutoDetectPorts() const override;
|
||||||
@@ -74,6 +70,8 @@ protected:
|
|||||||
friend class Ios::Internal::IosDeviceManager;
|
friend class Ios::Internal::IosDeviceManager;
|
||||||
IosDevice();
|
IosDevice();
|
||||||
IosDevice(const IosDevice &other);
|
IosDevice(const IosDevice &other);
|
||||||
|
IosDevice(const QString &uid);
|
||||||
|
|
||||||
Dict m_extraInfo;
|
Dict m_extraInfo;
|
||||||
bool m_ignoreDevice = false;
|
bool m_ignoreDevice = false;
|
||||||
mutable quint16 m_lastPort;
|
mutable quint16 m_lastPort;
|
||||||
@@ -88,7 +86,8 @@ public:
|
|||||||
bool canRestore(const QVariantMap &map) const override;
|
bool canRestore(const QVariantMap &map) const override;
|
||||||
};
|
};
|
||||||
|
|
||||||
class IosDeviceManager : public QObject {
|
class IosDeviceManager : public QObject
|
||||||
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
using TranslationMap = QHash<QString, QString>;
|
using TranslationMap = QHash<QString, QString>;
|
||||||
@@ -112,10 +111,5 @@ private:
|
|||||||
QStringList m_userModeDeviceIds;
|
QStringList m_userModeDeviceIds;
|
||||||
};
|
};
|
||||||
|
|
||||||
namespace IosKitAspect {
|
|
||||||
IosDevice::ConstPtr device(ProjectExplorer::Kit *);
|
|
||||||
}
|
|
||||||
|
|
||||||
} // namespace Internal
|
} // namespace Internal
|
||||||
|
|
||||||
} // namespace Ios
|
} // namespace Ios
|
||||||
|
@@ -97,17 +97,6 @@ IDevice::Ptr IosSimulator::clone() const
|
|||||||
return IDevice::Ptr(new IosSimulator(*this));
|
return IDevice::Ptr(new IosSimulator(*this));
|
||||||
}
|
}
|
||||||
|
|
||||||
void IosSimulator::fromMap(const QVariantMap &map)
|
|
||||||
{
|
|
||||||
IDevice::fromMap(map);
|
|
||||||
}
|
|
||||||
|
|
||||||
QVariantMap IosSimulator::toMap() const
|
|
||||||
{
|
|
||||||
QVariantMap res = IDevice::toMap();
|
|
||||||
return res;
|
|
||||||
}
|
|
||||||
|
|
||||||
Utils::Port IosSimulator::nextPort() const
|
Utils::Port IosSimulator::nextPort() const
|
||||||
{
|
{
|
||||||
for (int i = 0; i < 100; ++i) {
|
for (int i = 0; i < 100; ++i) {
|
||||||
@@ -140,14 +129,7 @@ Utils::OsType IosSimulator::osType() const
|
|||||||
return Utils::OsTypeMac;
|
return Utils::OsTypeMac;
|
||||||
}
|
}
|
||||||
|
|
||||||
IosSimulator::ConstPtr IosKitInformation::simulator(Kit *kit)
|
// IosDeviceType
|
||||||
{
|
|
||||||
if (!kit)
|
|
||||||
return IosSimulator::ConstPtr();
|
|
||||||
IDevice::ConstPtr dev = DeviceKitAspect::device(kit);
|
|
||||||
IosSimulator::ConstPtr res = dev.dynamicCast<const IosSimulator>();
|
|
||||||
return res;
|
|
||||||
}
|
|
||||||
|
|
||||||
IosDeviceType::IosDeviceType(IosDeviceType::Type type, const QString &identifier, const QString &displayName) :
|
IosDeviceType::IosDeviceType(IosDeviceType::Type type, const QString &identifier, const QString &displayName) :
|
||||||
type(type), identifier(identifier), displayName(displayName)
|
type(type), identifier(identifier), displayName(displayName)
|
||||||
|
@@ -32,13 +32,14 @@
|
|||||||
|
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
|
|
||||||
namespace ProjectExplorer { class Kit; }
|
|
||||||
namespace Ios {
|
namespace Ios {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
class IosConfigurations;
|
class IosConfigurations;
|
||||||
class IosSimulatorFactory;
|
class IosSimulatorFactory;
|
||||||
|
|
||||||
class IosDeviceType {
|
class IosDeviceType
|
||||||
|
{
|
||||||
public:
|
public:
|
||||||
enum Type {
|
enum Type {
|
||||||
IosDevice,
|
IosDevice,
|
||||||
@@ -58,6 +59,7 @@ public:
|
|||||||
QString identifier;
|
QString identifier;
|
||||||
QString displayName;
|
QString displayName;
|
||||||
};
|
};
|
||||||
|
|
||||||
QDebug operator <<(QDebug debug, const IosDeviceType &deviceType);
|
QDebug operator <<(QDebug debug, const IosDeviceType &deviceType);
|
||||||
|
|
||||||
class IosSimulator : public ProjectExplorer::IDevice
|
class IosSimulator : public ProjectExplorer::IDevice
|
||||||
@@ -70,8 +72,6 @@ public:
|
|||||||
QString displayType() const override;
|
QString displayType() const override;
|
||||||
ProjectExplorer::IDeviceWidget *createWidget() override;
|
ProjectExplorer::IDeviceWidget *createWidget() override;
|
||||||
ProjectExplorer::DeviceProcessSignalOperation::Ptr signalOperation() const override;
|
ProjectExplorer::DeviceProcessSignalOperation::Ptr signalOperation() const override;
|
||||||
void fromMap(const QVariantMap &map) override;
|
|
||||||
QVariantMap toMap() const override;
|
|
||||||
Utils::Port nextPort() const;
|
Utils::Port nextPort() const;
|
||||||
bool canAutoDetectPorts() const override;
|
bool canAutoDetectPorts() const override;
|
||||||
Utils::OsType osType() const override;
|
Utils::OsType osType() const override;
|
||||||
@@ -94,9 +94,6 @@ public:
|
|||||||
IosSimulatorFactory();
|
IosSimulatorFactory();
|
||||||
};
|
};
|
||||||
|
|
||||||
namespace IosKitInformation {
|
|
||||||
IosSimulator::ConstPtr simulator(ProjectExplorer::Kit *kit);
|
|
||||||
} // namespace IosKitInformation
|
|
||||||
} // namespace Internal
|
} // namespace Internal
|
||||||
} // namespace Ios
|
} // namespace Ios
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user