forked from qt-creator/qt-creator
InfoBar: Always order buttons in the same order
Change-Id: Ic95aa15ba770b6c75eb3a48bdfabdb7420f8d6ae Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -361,27 +361,22 @@ void InfoBarDisplay::update()
|
||||
});
|
||||
}
|
||||
|
||||
if (info.m_cancelButtonText.isEmpty()) {
|
||||
if (infoWidgetCloseButton) {
|
||||
if (infoWidgetCloseButton) {
|
||||
if (info.m_cancelButtonText.isEmpty()) {
|
||||
infoWidgetCloseButton->setAutoRaise(true);
|
||||
infoWidgetCloseButton->setIcon(Icons::CLOSE_FOREGROUND.icon());
|
||||
infoWidgetCloseButton->setToolTip(tr("Close"));
|
||||
}
|
||||
|
||||
if (infoWidgetSuppressButton)
|
||||
hbox->addWidget(infoWidgetSuppressButton);
|
||||
|
||||
if (infoWidgetCloseButton)
|
||||
hbox->addWidget(infoWidgetCloseButton);
|
||||
} else {
|
||||
if (infoWidgetCloseButton) {
|
||||
} else {
|
||||
infoWidgetCloseButton->setText(info.m_cancelButtonText);
|
||||
hbox->addWidget(infoWidgetCloseButton);
|
||||
}
|
||||
if (infoWidgetSuppressButton)
|
||||
hbox->addWidget(infoWidgetSuppressButton);
|
||||
}
|
||||
|
||||
if (infoWidgetSuppressButton)
|
||||
hbox->addWidget(infoWidgetSuppressButton);
|
||||
|
||||
if (infoWidgetCloseButton)
|
||||
hbox->addWidget(infoWidgetCloseButton);
|
||||
|
||||
connect(infoWidget, &QObject::destroyed, this, [this, infoWidget] {
|
||||
m_infoWidgets.removeOne(infoWidget);
|
||||
});
|
||||
|
Reference in New Issue
Block a user