diff options
author | Eike Ziller <eike.ziller@qt.io> | 2020-06-17 12:23:44 +0200 |
---|---|---|
committer | Eike Ziller <eike.ziller@qt.io> | 2020-06-18 06:39:54 +0000 |
commit | 7c5ed6f7d99362af743f30916d031d441abc1984 (patch) | |
tree | 7b8ef47da6e256e79f2e0034c0334350907c3057 /src/plugins/python/pythonutils.cpp | |
parent | c70c6ded30610afff34447a65da905e993e0e9b6 (diff) | |
download | qt-creator-7c5ed6f7d99362af743f30916d031d441abc1984.tar.gz |
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 <alessandro.portale@qt.io>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Diffstat (limited to 'src/plugins/python/pythonutils.cpp')
-rw-r--r-- | src/plugins/python/pythonutils.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
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 <coreplugin/editormanager/editormanager.h> -#include <coreplugin/infobar.h> #include <coreplugin/progressmanager/progressmanager.h> #include <languageclient/languageclientmanager.h> @@ -44,6 +43,7 @@ #include <texteditor/textdocument.h> #include <utils/consoleprocess.h> +#include <utils/infobar.h> #include <utils/mimetypes/mimedatabase.h> #include <utils/qtcassert.h> #include <utils/runextensions.h> @@ -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<TextEditor::TextDocument *> &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); |