forked from qt-creator/qt-creator
InfoBar: Make adding more buttons possible
Change-Id: Ic0c946cf3f87fe46cd06391f38e0bc71374ad340 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
This commit is contained in:
@@ -700,7 +700,7 @@ void QmlJSEditorDocument::setIsDesignModePreferred(bool value)
|
||||
if (infoBar()->canInfoBeAdded(QML_UI_FILE_WARNING)) {
|
||||
Utils::InfoBarEntry info(QML_UI_FILE_WARNING,
|
||||
tr("This file should only be edited in <b>Design</b> mode."));
|
||||
info.setCustomButtonInfo(tr("Switch Mode"), []() {
|
||||
info.addCustomButton(tr("Switch Mode"), []() {
|
||||
Core::ModeManager::activateMode(Core::Constants::MODE_DESIGN);
|
||||
});
|
||||
infoBar()->addInfo(info);
|
||||
|
||||
Reference in New Issue
Block a user