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:
@@ -139,7 +139,7 @@ static InfoBarEntry createMinimizableInfo(const Id &id,
|
||||
// The minimizer() might delete the "Minimize" button immediately and as
|
||||
// result invalid reads will happen in QToolButton::mouseReleaseEvent().
|
||||
// Avoid this by running the minimizer in the next event loop iteration.
|
||||
info.setCustomButtonInfo(MinimizableInfoBars::tr("Minimize"), [minimizer] {
|
||||
info.addCustomButton(MinimizableInfoBars::tr("Minimize"), [minimizer] {
|
||||
QMetaObject::invokeMethod(settings(), [minimizer] { minimizer(); }, Qt::QueuedConnection);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user