diff options
Diffstat (limited to 'plugins/haskell')
-rw-r--r-- | plugins/haskell/haskellhoverhandler.cpp | 5 | ||||
-rw-r--r-- | plugins/haskell/haskellhoverhandler.h | 4 | ||||
-rw-r--r-- | plugins/haskell/haskellrunconfiguration.cpp | 8 | ||||
-rw-r--r-- | plugins/haskell/haskellrunconfiguration.h | 4 |
4 files changed, 15 insertions, 6 deletions
diff --git a/plugins/haskell/haskellhoverhandler.cpp b/plugins/haskell/haskellhoverhandler.cpp index ffad6a9..1719297 100644 --- a/plugins/haskell/haskellhoverhandler.cpp +++ b/plugins/haskell/haskellhoverhandler.cpp @@ -70,7 +70,9 @@ QString symbolToHtml(const SymbolInfo &info) return result; } -void HaskellHoverHandler::identifyMatch(TextEditor::TextEditorWidget *editorWidget, int pos) +void HaskellHoverHandler::identifyMatch(TextEditor::TextEditorWidget *editorWidget, + int pos, + ReportPriority report) { cancel(); m_name.clear(); @@ -84,6 +86,7 @@ void HaskellHoverHandler::identifyMatch(TextEditor::TextEditorWidget *editorWidg } else { setPriority(-1); } + report(priority()); } static void showError(const QPointer<TextEditor::TextEditorWidget> &widget, diff --git a/plugins/haskell/haskellhoverhandler.h b/plugins/haskell/haskellhoverhandler.h index 8cad5c5..ab200a1 100644 --- a/plugins/haskell/haskellhoverhandler.h +++ b/plugins/haskell/haskellhoverhandler.h @@ -37,7 +37,9 @@ namespace Internal { class HaskellHoverHandler : public TextEditor::BaseHoverHandler { private: - void identifyMatch(TextEditor::TextEditorWidget *editorWidget, int pos) override; + void identifyMatch(TextEditor::TextEditorWidget *editorWidget, + int pos, + ReportPriority report) override; void operateTooltip(TextEditor::TextEditorWidget *editorWidget, const QPoint &point) override; void cancel(); diff --git a/plugins/haskell/haskellrunconfiguration.cpp b/plugins/haskell/haskellrunconfiguration.cpp index 87514e3..661fa05 100644 --- a/plugins/haskell/haskellrunconfiguration.cpp +++ b/plugins/haskell/haskellrunconfiguration.cpp @@ -51,12 +51,16 @@ HaskellRunConfigurationFactory::HaskellRunConfigurationFactory() setSupportedTargetDeviceTypes({ProjectExplorer::Constants::DESKTOP_DEVICE_TYPE}); } -QList<QString> HaskellRunConfigurationFactory::availableBuildTargets( +QList<BuildTargetInfo> HaskellRunConfigurationFactory::availableBuildTargets( Target *parent, IRunConfigurationFactory::CreationMode mode) const { Q_UNUSED(mode) const auto project = HaskellProject::toHaskellProject(parent->project()); - return project ? project->availableExecutables() : QList<QString>(); + if (!project) + return {}; + return Utils::transform(project->availableExecutables(), [](const QString &name) { + return BuildTargetInfo(name, Utils::FileName(), Utils::FileName()); + }); } HaskellRunConfiguration::HaskellRunConfiguration(Target *parent) diff --git a/plugins/haskell/haskellrunconfiguration.h b/plugins/haskell/haskellrunconfiguration.h index 7423487..9970d65 100644 --- a/plugins/haskell/haskellrunconfiguration.h +++ b/plugins/haskell/haskellrunconfiguration.h @@ -37,8 +37,8 @@ class HaskellRunConfigurationFactory : public ProjectExplorer::IRunConfiguration public: HaskellRunConfigurationFactory(); - QList<QString> availableBuildTargets(ProjectExplorer::Target *parent, - CreationMode mode) const override; + QList<ProjectExplorer::BuildTargetInfo> availableBuildTargets(ProjectExplorer::Target *parent, + CreationMode mode) const override; }; class HaskellRunConfiguration : public ProjectExplorer::RunConfiguration |