forked from qt-creator/qt-creator
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:
@@ -36,13 +36,14 @@
|
||||
#include "qmloutlinemodel.h"
|
||||
|
||||
#include <coreplugin/coreconstants.h>
|
||||
#include <coreplugin/infobar.h>
|
||||
#include <coreplugin/modemanager.h>
|
||||
|
||||
#include <qmljstools/qmljsindenter.h>
|
||||
#include <qmljstools/qmljsmodelmanager.h>
|
||||
#include <qmljstools/qmljsqtstylecodeformatter.h>
|
||||
|
||||
#include <utils/infobar.h>
|
||||
|
||||
#include <QDebug>
|
||||
|
||||
const char QML_UI_FILE_WARNING[] = "QmlJSEditor.QmlUiFileWarning";
|
||||
@@ -692,8 +693,8 @@ void QmlJSEditorDocument::setIsDesignModePreferred(bool value)
|
||||
d->m_isDesignModePreferred = value;
|
||||
if (value) {
|
||||
if (infoBar()->canInfoBeAdded(QML_UI_FILE_WARNING)) {
|
||||
Core::InfoBarEntry info(QML_UI_FILE_WARNING,
|
||||
tr("This file should only be edited in <b>Design</b> mode."));
|
||||
Utils::InfoBarEntry info(QML_UI_FILE_WARNING,
|
||||
tr("This file should only be edited in <b>Design</b> mode."));
|
||||
info.setCustomButtonInfo(tr("Switch Mode"), []() {
|
||||
Core::ModeManager::activateMode(Core::Constants::MODE_DESIGN);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user