aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Ziller <eike.ziller@qt.io>2018-07-19 09:58:44 +0200
committerEike Ziller <eike.ziller@qt.io>2018-07-19 09:58:44 +0200
commit87537724ef5ee295244a638d0285ffe0e2b9d6ce (patch)
tree9abc00d474e1b7cc6f44fdd0556b48b1868b0a86
parent103d6e8d7b699c90a32deec1e9dcc07181e738d5 (diff)
parent9a3a1b266446bb2d35b5ef633f74c65a6f62d74f (diff)
Merge remote-tracking branch 'origin/4.7'
-rw-r--r--plugins/haskell/haskellbuildconfiguration.cpp4
-rw-r--r--plugins/haskell/haskellbuildconfiguration.h2
-rw-r--r--plugins/haskell/haskellproject.cpp8
-rw-r--r--plugins/haskell/haskellrunconfiguration.cpp3
4 files changed, 10 insertions, 7 deletions
diff --git a/plugins/haskell/haskellbuildconfiguration.cpp b/plugins/haskell/haskellbuildconfiguration.cpp
index 618ddd7..314a4e8 100644
--- a/plugins/haskell/haskellbuildconfiguration.cpp
+++ b/plugins/haskell/haskellbuildconfiguration.cpp
@@ -88,8 +88,8 @@ QList<BuildInfo *> HaskellBuildConfigurationFactory::availableSetups(
return createInfos(this, k, Utils::FileName::fromString(projectPath));
}
-HaskellBuildConfiguration::HaskellBuildConfiguration(Target *target)
- : BuildConfiguration(target, C_HASKELL_BUILDCONFIGURATION_ID)
+HaskellBuildConfiguration::HaskellBuildConfiguration(Target *target, Core::Id id)
+ : BuildConfiguration(target, id)
{}
NamedWidget *HaskellBuildConfiguration::createConfigWidget()
diff --git a/plugins/haskell/haskellbuildconfiguration.h b/plugins/haskell/haskellbuildconfiguration.h
index 66e3323..146294b 100644
--- a/plugins/haskell/haskellbuildconfiguration.h
+++ b/plugins/haskell/haskellbuildconfiguration.h
@@ -49,7 +49,7 @@ class HaskellBuildConfiguration : public ProjectExplorer::BuildConfiguration
Q_OBJECT
public:
- explicit HaskellBuildConfiguration(ProjectExplorer::Target *target);
+ HaskellBuildConfiguration(ProjectExplorer::Target *target, Core::Id id);
ProjectExplorer::NamedWidget *createConfigWidget() override;
BuildType buildType() const override;
diff --git a/plugins/haskell/haskellproject.cpp b/plugins/haskell/haskellproject.cpp
index 298c425..af6b806 100644
--- a/plugins/haskell/haskellproject.cpp
+++ b/plugins/haskell/haskellproject.cpp
@@ -102,8 +102,12 @@ void HaskellProject::updateFiles()
Utils::onResultReady(future, this, [this](const QList<FileNode *> &nodes) {
auto root = new HaskellProjectNode(projectDirectory(), id());
root->setDisplayName(displayName());
- root->addNestedNodes(nodes);
- setRootProjectNode(root);
+ std::vector<std::unique_ptr<FileNode>> nodePtrs
+ = Utils::transform<std::vector>(nodes, [](FileNode *fn) {
+ return std::unique_ptr<FileNode>(fn);
+ });
+ root->addNestedNodes(std::move(nodePtrs));
+ setRootProjectNode(std::unique_ptr<ProjectNode>(root));
emitParsingFinished(true);
});
}
diff --git a/plugins/haskell/haskellrunconfiguration.cpp b/plugins/haskell/haskellrunconfiguration.cpp
index 89a33c3..9281914 100644
--- a/plugins/haskell/haskellrunconfiguration.cpp
+++ b/plugins/haskell/haskellrunconfiguration.cpp
@@ -33,7 +33,6 @@
#include <projectexplorer/localenvironmentaspect.h>
#include <projectexplorer/projectexplorerconstants.h>
#include <projectexplorer/runconfigurationaspects.h>
-#include <projectexplorer/runnables.h>
#include <projectexplorer/target.h>
using namespace ProjectExplorer;
@@ -90,7 +89,7 @@ void HaskellRunConfiguration::doAdditionalSetup(const RunConfigurationCreationIn
Runnable HaskellRunConfiguration::runnable() const
{
const QString projectDirectory = target()->project()->projectDirectory().toString();
- StandardRunnable r;
+ Runnable r;
if (BuildConfiguration *buildConfiguration = target()->activeBuildConfiguration())
r.commandLineArguments += "--work-dir \""
+ QDir(projectDirectory)