From 7c5ed6f7d99362af743f30916d031d441abc1984 Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Wed, 17 Jun 2020 12:23:44 +0200 Subject: Move InfoBar to Utils The only reason it was required to be in Core plugin, was its use of Id, which now is available in Utils. Change-Id: I66ce863c24924e6448d339b3422538a7fe167336 Reviewed-by: Alessandro Portale Reviewed-by: Orgad Shaneh --- src/plugins/python/pythonutils.cpp | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'src/plugins/python/pythonutils.cpp') diff --git a/src/plugins/python/pythonutils.cpp b/src/plugins/python/pythonutils.cpp index 364b97017c..6cf646a27a 100644 --- a/src/plugins/python/pythonutils.cpp +++ b/src/plugins/python/pythonutils.cpp @@ -32,7 +32,6 @@ #include "pythonsettings.h" #include -#include #include #include @@ -44,6 +43,7 @@ #include #include +#include #include #include #include @@ -412,15 +412,15 @@ void PyLSConfigureAssistant::handlePyLSState(const FilePath &python, } resetEditorInfoBar(document); - Core::InfoBar *infoBar = document->infoBar(); + Utils::InfoBar *infoBar = document->infoBar(); if (state.state == PythonLanguageServerState::CanBeInstalled && infoBar->canInfoBeAdded(installPylsInfoBarId)) { auto message = tr("Install and set up Python language server (PyLS) for %1 (%2). " "The language server provides Python specific completion and annotation.") .arg(pythonName(python), python.toUserOutput()); - Core::InfoBarEntry info(installPylsInfoBarId, - message, - Core::InfoBarEntry::GlobalSuppression::Enabled); + Utils::InfoBarEntry info(installPylsInfoBarId, + message, + Utils::InfoBarEntry::GlobalSuppression::Enabled); info.setCustomButtonInfo(tr("Install"), [=]() { installPythonLanguageServer(python, document); }); infoBar->addInfo(info); @@ -430,9 +430,9 @@ void PyLSConfigureAssistant::handlePyLSState(const FilePath &python, auto message = tr("Found a Python language server for %1 (%2). " "Set it up for this document?") .arg(pythonName(python), python.toUserOutput()); - Core::InfoBarEntry info(startPylsInfoBarId, - message, - Core::InfoBarEntry::GlobalSuppression::Enabled); + Utils::InfoBarEntry info(startPylsInfoBarId, + message, + Utils::InfoBarEntry::GlobalSuppression::Enabled); info.setCustomButtonInfo(tr("Setup"), [=]() { setupPythonLanguageServer(python, document); }); infoBar->addInfo(info); @@ -441,9 +441,9 @@ void PyLSConfigureAssistant::handlePyLSState(const FilePath &python, && infoBar->canInfoBeAdded(enablePylsInfoBarId)) { auto message = tr("Enable Python language server for %1 (%2)?") .arg(pythonName(python), python.toUserOutput()); - Core::InfoBarEntry info(enablePylsInfoBarId, - message, - Core::InfoBarEntry::GlobalSuppression::Enabled); + Utils::InfoBarEntry info(enablePylsInfoBarId, + message, + Utils::InfoBarEntry::GlobalSuppression::Enabled); info.setCustomButtonInfo(tr("Enable"), [=]() { enablePythonLanguageServer(python, document); }); infoBar->addInfo(info); @@ -464,7 +464,7 @@ void PyLSConfigureAssistant::resetEditorInfoBar(TextEditor::TextDocument *docume { for (QList &documents : m_infoBarEntries) documents.removeAll(document); - Core::InfoBar *infoBar = document->infoBar(); + Utils::InfoBar *infoBar = document->infoBar(); infoBar->removeInfo(installPylsInfoBarId); infoBar->removeInfo(startPylsInfoBarId); infoBar->removeInfo(enablePylsInfoBarId); -- cgit v1.2.1