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

@@ -36,15 +36,15 @@
#include <coreplugin/editormanager/editormanager.h>
#include <coreplugin/icore.h>
#include <coreplugin/idocument.h>
#include <coreplugin/infobar.h>
#include <coreplugin/minisplitter.h>
#include <coreplugin/modemanager.h>
#include <coreplugin/outputpane.h>
#include <projectexplorer/projectexplorerconstants.h>
#include <utils/qtcassert.h>
#include <utils/icon.h>
#include <utils/infobar.h>
#include <utils/qtcassert.h>
#include <utils/utilsicons.h>
#include <QVBoxLayout>
@@ -160,8 +160,8 @@ IEditor *ScxmlEditorData::createEditor()
m_mainToolBar->addEditor(xmlEditor);
if (xmlEditor) {
InfoBarEntry info(Id(Constants::INFO_READ_ONLY),
tr("This file can only be edited in <b>Design</b> mode."));
Utils::InfoBarEntry info(Id(Constants::INFO_READ_ONLY),
tr("This file can only be edited in <b>Design</b> mode."));
info.setCustomButtonInfo(tr("Switch Mode"), []() { ModeManager::activateMode(Core::Constants::MODE_DESIGN); });
xmlEditor->document()->infoBar()->addInfo(info);
}