diff options
author | Eike Ziller <eike.ziller@qt.io> | 2018-02-17 11:10:22 +0100 |
---|---|---|
committer | Eike Ziller <eike.ziller@qt.io> | 2018-02-17 10:11:21 +0000 |
commit | 4ca4a6b4d108a1681e66de8f82e50d1f7a46d926 (patch) | |
tree | 9727b24c3ff114ae7b8d9d7da0da417bf15d66b3 /plugins | |
parent | 6db6c04550d36a84ba3a8c3c95eafbdf4fba87d4 (diff) |
Adapt to Qt Creator changes4.6
In hover handler and run configuration factory
Change-Id: Ib60db43560e8485ce9b5a8f9ddcb703382a0ef70
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Diffstat (limited to 'plugins')
-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 |