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:
@@ -746,7 +746,7 @@ void AndroidManifestEditorWidget::updateInfoBar(const QString &errorMessage, int
|
||||
else
|
||||
text = tr("%2: Could not parse file: \"%1\".").arg(errorMessage).arg(line);
|
||||
Utils::InfoBarEntry infoBarEntry(infoBarId, text);
|
||||
infoBarEntry.setCustomButtonInfo(tr("Goto error"), [this]() {
|
||||
infoBarEntry.addCustomButton(tr("Goto error"), [this]() {
|
||||
m_textEditorWidget->gotoLine(m_errorLine, m_errorColumn);
|
||||
});
|
||||
infoBar->removeInfo(infoBarId);
|
||||
|
||||
@@ -195,7 +195,7 @@ void AndroidPlugin::askUserAboutAndroidSetup()
|
||||
"Android kits can be usable and all essential packages are installed. "
|
||||
"To do it later, select Options > Devices > Android."),
|
||||
Utils::InfoBarEntry::GlobalSuppression::Enabled);
|
||||
info.setCustomButtonInfo(tr("Configure Android"), [this] {
|
||||
info.addCustomButton(tr("Configure Android"), [this] {
|
||||
Core::ICore::infoBar()->removeInfo(kSetupAndroidSetting);
|
||||
Core::ICore::infoBar()->globallySuppressInfo(kSetupAndroidSetting);
|
||||
QTimer::singleShot(0, this, [this]() { d->potentialKit.executeFromMenu(); });
|
||||
|
||||
Reference in New Issue
Block a user