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:
@@ -33,12 +33,13 @@
|
||||
#include <coreplugin/coreconstants.h>
|
||||
#include <coreplugin/icontext.h>
|
||||
#include <coreplugin/icore.h>
|
||||
#include <coreplugin/infobar.h>
|
||||
|
||||
#include <projectexplorer/devicesupport/devicemanager.h>
|
||||
#include <projectexplorer/jsonwizard/jsonwizardfactory.h>
|
||||
#include <projectexplorer/kitmanager.h>
|
||||
|
||||
#include <utils/infobar.h>
|
||||
|
||||
#include <QTimer>
|
||||
|
||||
using namespace Core;
|
||||
@@ -107,11 +108,10 @@ void McuSupportPlugin::askUserAboutMcuSupportKitsSetup()
|
||||
|| !McuSupportOptions::existingKits(nullptr).isEmpty())
|
||||
return;
|
||||
|
||||
InfoBarEntry info(
|
||||
setupMcuSupportKits,
|
||||
tr("Create Kits for Qt for MCUs? "
|
||||
"To do it later, select Options > Devices > MCU."),
|
||||
InfoBarEntry::GlobalSuppression::Enabled);
|
||||
Utils::InfoBarEntry info(setupMcuSupportKits,
|
||||
tr("Create Kits for Qt for MCUs? "
|
||||
"To do it later, select Options > Devices > MCU."),
|
||||
Utils::InfoBarEntry::GlobalSuppression::Enabled);
|
||||
info.setCustomButtonInfo(tr("Create Kits for Qt for MCUs"), [setupMcuSupportKits] {
|
||||
ICore::infoBar()->removeInfo(setupMcuSupportKits);
|
||||
QTimer::singleShot(0, []() { ICore::showOptionsDialog(Constants::SETTINGS_ID); });
|
||||
|
||||
Reference in New Issue
Block a user