aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/haskell/haskellrunconfiguration.cpp
diff options
context:
space:
mode:
authorhjk <[email protected]>2017-11-27 14:56:45 +0100
committerEike Ziller <[email protected]>2018-03-19 09:35:42 +0000
commit50e8ba6e959c533491fc8b8e64e155468b333552 (patch)
treead9241a4821649093ba0ecd1d90af22972461e3c /plugins/haskell/haskellrunconfiguration.cpp
parent53592d59133868de4d9e667f647fac126e9f930b (diff)
Adapt to upstream infrastructure changes
Change-Id: Ic3f470b1d3df47b90f054ef1e006927b9ee675ca Reviewed-by: Eike Ziller <[email protected]>
Diffstat (limited to 'plugins/haskell/haskellrunconfiguration.cpp')
-rw-r--r--plugins/haskell/haskellrunconfiguration.cpp22
1 files changed, 7 insertions, 15 deletions
diff --git a/plugins/haskell/haskellrunconfiguration.cpp b/plugins/haskell/haskellrunconfiguration.cpp
index 661fa05..c9ac93f 100644
--- a/plugins/haskell/haskellrunconfiguration.cpp
+++ b/plugins/haskell/haskellrunconfiguration.cpp
@@ -48,19 +48,7 @@ HaskellRunConfigurationFactory::HaskellRunConfigurationFactory()
{
registerRunConfiguration<HaskellRunConfiguration>(Constants::C_HASKELL_RUNCONFIG_ID_PREFIX);
addSupportedProjectType(Constants::C_HASKELL_PROJECT_ID);
- setSupportedTargetDeviceTypes({ProjectExplorer::Constants::DESKTOP_DEVICE_TYPE});
-}
-
-QList<BuildTargetInfo> HaskellRunConfigurationFactory::availableBuildTargets(
- Target *parent, IRunConfigurationFactory::CreationMode mode) const
-{
- Q_UNUSED(mode)
- const auto project = HaskellProject::toHaskellProject(parent->project());
- if (!project)
- return {};
- return Utils::transform(project->availableExecutables(), [](const QString &name) {
- return BuildTargetInfo(name, Utils::FileName(), Utils::FileName());
- });
+ addSupportedTargetDeviceType(ProjectExplorer::Constants::DESKTOP_DEVICE_TYPE);
}
HaskellRunConfiguration::HaskellRunConfiguration(Target *parent)
@@ -117,12 +105,16 @@ bool HaskellRunConfiguration::fromMap(const QVariantMap &map)
if (!RunConfiguration::fromMap(map))
return false;
m_executable = map.value(QString(Constants::C_HASKELL_EXECUTABLE_KEY)).toString();
- if (m_executable.isEmpty())
- m_executable = ProjectExplorer::idFromMap(map).suffixAfter(id());
setDefaultDisplayName(m_executable);
return true;
}
+void HaskellRunConfiguration::doAdditionalSetup(const RunConfigurationCreationInfo &info)
+{
+ m_executable = info.targetName;
+ setDefaultDisplayName(m_executable);
+}
+
QVariantMap HaskellRunConfiguration::toMap() const
{
QVariantMap map = RunConfiguration::toMap();