diff options
author | Eike Ziller <eike.ziller@qt.io> | 2018-03-19 13:04:37 +0100 |
---|---|---|
committer | Eike Ziller <eike.ziller@qt.io> | 2018-03-20 09:55:28 +0000 |
commit | 58eb877e5788bdb00a13a716b1da24ad6f0d7cdd (patch) | |
tree | 280b68307644cd0184097eeeb572ba28b131e545 | |
parent | 50e8ba6e959c533491fc8b8e64e155468b333552 (diff) |
Update available run configurations when project file changes
Change-Id: Ic9065961f12f424aa0f755c8c27f875614154bdb
Reviewed-by: hjk <hjk@qt.io>
-rw-r--r-- | plugins/haskell/haskellproject.cpp | 9 | ||||
-rw-r--r-- | plugins/haskell/haskellproject.h | 1 |
2 files changed, 9 insertions, 1 deletions
diff --git a/plugins/haskell/haskellproject.cpp b/plugins/haskell/haskellproject.cpp index d87f6fc..e661f04 100644 --- a/plugins/haskell/haskellproject.cpp +++ b/plugins/haskell/haskellproject.cpp @@ -70,7 +70,7 @@ HaskellProjectNode::HaskellProjectNode(const FileName &projectFilePath, Core::Id {} HaskellProject::HaskellProject(const Utils::FileName &fileName) - : Project(Constants::C_HASKELL_PROJECT_MIMETYPE, fileName) + : Project(Constants::C_HASKELL_PROJECT_MIMETYPE, fileName, [this] { refresh(); }) { setId(Constants::C_HASKELL_PROJECT_ID); setDisplayName(fileName.toFileInfo().completeBaseName()); @@ -130,5 +130,12 @@ void HaskellProject::updateApplicationTargets(Target *target) target->updateDefaultRunConfigurations(); } +void HaskellProject::refresh() +{ + updateFiles(); + if (activeTarget()) + updateApplicationTargets(activeTarget()); +} + } // namespace Internal } // namespace Haskell diff --git a/plugins/haskell/haskellproject.h b/plugins/haskell/haskellproject.h index 245c997..0c307e7 100644 --- a/plugins/haskell/haskellproject.h +++ b/plugins/haskell/haskellproject.h @@ -49,6 +49,7 @@ public: private: void updateFiles(); void updateApplicationTargets(ProjectExplorer::Target *target); + void refresh(); }; } // namespace Internal |