iOS: Move towards more aspect use

Put the remaining device related pieces into a new IosDeviceTypeAspect.

Change-Id: Ia1ce2002edebedc2d409edc1144ade0ffe24a084
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
This commit is contained in:
hjk
2018-09-19 09:01:01 +02:00
parent 7de461e40b
commit ad7d37cc36
2 changed files with 54 additions and 59 deletions

View File

@@ -36,8 +36,7 @@ namespace Ios {
namespace Internal {
class IosDeployStep;
class IosRunConfigurationFactory;
class IosRunConfigurationWidget;
class IosDeviceTypeAspect;
class IosRunConfiguration : public ProjectExplorer::RunConfiguration
{
@@ -46,7 +45,6 @@ class IosRunConfiguration : public ProjectExplorer::RunConfiguration
public:
IosRunConfiguration(ProjectExplorer::Target *target, Core::Id id);
QWidget *createConfigurationWidget() override;
IosDeployStep *deployStep() const;
Utils::FileName profilePath() const;
@@ -55,21 +53,16 @@ public:
Utils::FileName localExecutable() const;
QString disabledReason() const override;
IosDeviceType deviceType() const;
void setDeviceType(const IosDeviceType &deviceType);
void doAdditionalSetup(const ProjectExplorer::RunConfigurationCreationInfo &) override;
bool fromMap(const QVariantMap &map) override;
QVariantMap toMap() const override;
private:
void deviceChanges();
friend class IosRunConfigurationWidget;
void updateDeviceType();
friend class IosDeviceTypeAspect;
void updateDisplayNames();
void updateEnabledState() final;
bool canRunForNode(const ProjectExplorer::Node *node) const final;
IosDeviceType m_deviceType;
IosDeviceTypeAspect *m_deviceTypeAspect = nullptr;
};
class IosRunConfigurationFactory : public ProjectExplorer::RunConfigurationFactory