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>
This commit is contained in:
Eike Ziller
2020-06-17 12:23:44 +02:00
parent c70c6ded30
commit 7c5ed6f7d9
41 changed files with 166 additions and 156 deletions

View File

@@ -30,7 +30,7 @@
#include "cpphighlighter.h"
#include "cppquickfixassistant.h"
#include <coreplugin/infobar.h>
#include <coreplugin/editormanager/editormanager.h>
#include <cpptools/baseeditordocumentparser.h>
#include <cpptools/builtineditordocumentprocessor.h>
@@ -48,8 +48,8 @@
#include <texteditor/textdocumentlayout.h>
#include <texteditor/texteditorsettings.h>
#include <coreplugin/editormanager/editormanager.h>
#include <utils/executeondestruction.h>
#include <utils/infobar.h>
#include <utils/mimetypes/mimedatabase.h>
#include <utils/qtcassert.h>
#include <utils/runextensions.h>
@@ -354,10 +354,10 @@ void CppEditorDocument::showHideInfoBarAboutMultipleParseContexts(bool show)
const Core::Id id = Constants::MULTIPLE_PARSE_CONTEXTS_AVAILABLE;
if (show) {
Core::InfoBarEntry info(id,
tr("Note: Multiple parse contexts are available for this file. "
"Choose the preferred one from the editor toolbar."),
Core::InfoBarEntry::GlobalSuppression::Enabled);
Utils::InfoBarEntry info(id,
tr("Note: Multiple parse contexts are available for this file. "
"Choose the preferred one from the editor toolbar."),
Utils::InfoBarEntry::GlobalSuppression::Enabled);
info.removeCancelButton();
if (infoBar()->canInfoBeAdded(id))
infoBar()->addInfo(info);