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
|
||||
|
||||
IosDeviceFactory::IosDeviceFactory()
|
||||
|
@@ -36,9 +36,6 @@
|
||||
#include <QStringList>
|
||||
#include <QTimer>
|
||||
|
||||
namespace ProjectExplorer{
|
||||
class Kit;
|
||||
}
|
||||
namespace Ios {
|
||||
class IosConfigurations;
|
||||
|
||||
@@ -61,7 +58,6 @@ public:
|
||||
void fromMap(const QVariantMap &map) override;
|
||||
QVariantMap toMap() const override;
|
||||
QString uniqueDeviceID() const;
|
||||
IosDevice(const QString &uid);
|
||||
QString osVersion() const;
|
||||
Utils::Port nextPort() const;
|
||||
bool canAutoDetectPorts() const override;
|
||||
@@ -74,6 +70,8 @@ protected:
|
||||
friend class Ios::Internal::IosDeviceManager;
|
||||
IosDevice();
|
||||
IosDevice(const IosDevice &other);
|
||||
IosDevice(const QString &uid);
|
||||
|
||||
Dict m_extraInfo;
|
||||
bool m_ignoreDevice = false;
|
||||
mutable quint16 m_lastPort;
|
||||
@@ -88,7 +86,8 @@ public:
|
||||
bool canRestore(const QVariantMap &map) const override;
|
||||
};
|
||||
|
||||
class IosDeviceManager : public QObject {
|
||||
class IosDeviceManager : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
using TranslationMap = QHash<QString, QString>;
|
||||
@@ -112,10 +111,5 @@ private:
|
||||
QStringList m_userModeDeviceIds;
|
||||
};
|
||||
|
||||
namespace IosKitAspect {
|
||||
IosDevice::ConstPtr device(ProjectExplorer::Kit *);
|
||||
}
|
||||
|
||||
} // namespace Internal
|
||||
|
||||
} // namespace Ios
|
||||
|
@@ -97,17 +97,6 @@ IDevice::Ptr IosSimulator::clone() const
|
||||
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
|
||||
{
|
||||
for (int i = 0; i < 100; ++i) {
|
||||
@@ -140,14 +129,7 @@ Utils::OsType IosSimulator::osType() const
|
||||
return Utils::OsTypeMac;
|
||||
}
|
||||
|
||||
IosSimulator::ConstPtr IosKitInformation::simulator(Kit *kit)
|
||||
{
|
||||
if (!kit)
|
||||
return IosSimulator::ConstPtr();
|
||||
IDevice::ConstPtr dev = DeviceKitAspect::device(kit);
|
||||
IosSimulator::ConstPtr res = dev.dynamicCast<const IosSimulator>();
|
||||
return res;
|
||||
}
|
||||
// IosDeviceType
|
||||
|
||||
IosDeviceType::IosDeviceType(IosDeviceType::Type type, const QString &identifier, const QString &displayName) :
|
||||
type(type), identifier(identifier), displayName(displayName)
|
||||
|
@@ -32,13 +32,14 @@
|
||||
|
||||
#include <QDebug>
|
||||
|
||||
namespace ProjectExplorer { class Kit; }
|
||||
namespace Ios {
|
||||
namespace Internal {
|
||||
|
||||
class IosConfigurations;
|
||||
class IosSimulatorFactory;
|
||||
|
||||
class IosDeviceType {
|
||||
class IosDeviceType
|
||||
{
|
||||
public:
|
||||
enum Type {
|
||||
IosDevice,
|
||||
@@ -58,6 +59,7 @@ public:
|
||||
QString identifier;
|
||||
QString displayName;
|
||||
};
|
||||
|
||||
QDebug operator <<(QDebug debug, const IosDeviceType &deviceType);
|
||||
|
||||
class IosSimulator : public ProjectExplorer::IDevice
|
||||
@@ -70,8 +72,6 @@ public:
|
||||
QString displayType() const override;
|
||||
ProjectExplorer::IDeviceWidget *createWidget() override;
|
||||
ProjectExplorer::DeviceProcessSignalOperation::Ptr signalOperation() const override;
|
||||
void fromMap(const QVariantMap &map) override;
|
||||
QVariantMap toMap() const override;
|
||||
Utils::Port nextPort() const;
|
||||
bool canAutoDetectPorts() const override;
|
||||
Utils::OsType osType() const override;
|
||||
@@ -94,9 +94,6 @@ public:
|
||||
IosSimulatorFactory();
|
||||
};
|
||||
|
||||
namespace IosKitInformation {
|
||||
IosSimulator::ConstPtr simulator(ProjectExplorer::Kit *kit);
|
||||
} // namespace IosKitInformation
|
||||
} // namespace Internal
|
||||
} // namespace Ios
|
||||
|
||||
|
Reference in New Issue
Block a user