iOS: Use base method to list run configurations

The base method is good enough nowadays.

Change-Id: I1affc678a2168d002ed8f627a56f172e30c1c0be
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
This commit is contained in:
hjk
2018-03-19 13:39:11 +01:00
parent 40730a4eb2
commit 116f7db28c
4 changed files with 6 additions and 23 deletions

View File

@@ -263,6 +263,11 @@ bool IosRunConfiguration::fromMap(const QVariantMap &map)
return true;
}
void IosRunConfiguration::doAdditionalSetup(const RunConfigurationCreationInfo &info)
{
m_profilePath = Utils::FileName::fromString(info.buildKey);
}
QVariantMap IosRunConfiguration::toMap() const
{
QVariantMap res = RunConfiguration::toMap();

View File

@@ -69,6 +69,7 @@ signals:
private:
QString extraId() const final;
void doAdditionalSetup(const ProjectExplorer::RunConfigurationCreationInfo &info) final;
void deviceChanges();
friend class IosRunConfigurationWidget;

View File

@@ -28,17 +28,8 @@
#include "iosconstants.h"
#include "iosrunconfiguration.h"
#include <projectexplorer/project.h>
#include <projectexplorer/projectexplorerconstants.h>
#include <projectexplorer/target.h>
#include <qmakeprojectmanager/qmakenodes.h>
#include <qmakeprojectmanager/qmakeproject.h>
#include <qmakeprojectmanager/qmakeprojectmanagerconstants.h>
using namespace ProjectExplorer;
using namespace QmakeProjectManager;
namespace Ios {
namespace Internal {
@@ -50,14 +41,5 @@ IosRunConfigurationFactory::IosRunConfigurationFactory()
addSupportedProjectType(QmakeProjectManager::Constants::QMAKEPROJECT_ID);
}
QList<RunConfigurationCreationInfo>
IosRunConfigurationFactory::availableCreators(Target *parent) const
{
auto project = qobject_cast<QmakeProject *>(parent->project());
QTC_ASSERT(project, return {});
return project->runConfigurationCreators(this, {ProjectType::ApplicationTemplate,
ProjectType::SharedLibraryTemplate});
}
} // namespace Internal
} // namespace Ios

View File

@@ -32,13 +32,8 @@ namespace Internal {
class IosRunConfigurationFactory : public ProjectExplorer::RunConfigurationFactory
{
Q_OBJECT
public:
IosRunConfigurationFactory();
QList<ProjectExplorer::RunConfigurationCreationInfo>
availableCreators(ProjectExplorer::Target *parent) const override;
};
} // namespace Internal