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:
@@ -113,7 +113,7 @@ QmlProject::QmlProject(const Utils::FilePath &fileName)
|
||||
info(openInQDSAppSetting,
|
||||
tr("Would you like to open the project in Qt Design Studio?"),
|
||||
Utils::InfoBarEntry::GlobalSuppression::Disabled);
|
||||
info.setCustomButtonInfo(tr("Open in Qt Design Studio"), [&, fileName] {
|
||||
info.addCustomButton(tr("Open in Qt Design Studio"), [&, fileName] {
|
||||
Core::ICore::infoBar()->removeInfo(openInQDSAppSetting);
|
||||
QmlProjectPlugin::openQDS(fileName);
|
||||
});
|
||||
|
||||
@@ -212,7 +212,7 @@ bool QmlProjectPlugin::initialize(const QStringList &, QString *errorMessage)
|
||||
info(openInQDSAppSetting,
|
||||
description + "\n" + tr("Do you want to open this file in Qt Design Studio?"),
|
||||
Utils::InfoBarEntry::GlobalSuppression::Disabled);
|
||||
info.setCustomButtonInfo(tr("Open in Qt Design Studio"), [filePath] {
|
||||
info.addCustomButton(tr("Open in Qt Design Studio"), [filePath] {
|
||||
Core::ICore::infoBar()->removeInfo(openInQDSAppSetting);
|
||||
|
||||
if (findAndOpenProject(filePath)) {
|
||||
|
||||
Reference in New Issue
Block a user