diff options
author | Eike Ziller <eike.ziller@qt.io> | 2022-12-07 15:56:07 +0100 |
---|---|---|
committer | Eike Ziller <eike.ziller@qt.io> | 2022-12-08 08:05:13 +0000 |
commit | deb454d8fbe24ca68a0c7024207537834fcecae8 (patch) | |
tree | bc26afcf7e96f1eed52b8dc7e42d1186059f9526 | |
parent | b4015fc345416f2c15a1d95e36287936e9438b02 (diff) |
SaveItemsDialog: Fix default button
Changed when removing .ui file. Call order is important here.
Amends b3e3de517d4688a94427ddf50e8bb86b419f6696
Task-number: QTCREATORBUG-28536
Change-Id: I04d9351f8bb7f2ed170f3643ba84af5f8afe35ab
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: André Hartmann <aha_1980@gmx.de>
-rw-r--r-- | src/plugins/coreplugin/dialogs/saveitemsdialog.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/plugins/coreplugin/dialogs/saveitemsdialog.cpp b/src/plugins/coreplugin/dialogs/saveitemsdialog.cpp index 25e77a7778..57b43c9293 100644 --- a/src/plugins/coreplugin/dialogs/saveitemsdialog.cpp +++ b/src/plugins/coreplugin/dialogs/saveitemsdialog.cpp @@ -55,7 +55,6 @@ SaveItemsDialog::SaveItemsDialog(QWidget *parent, const QList<IDocument *> &item } m_buttonBox->setStandardButtons(QDialogButtonBox::Cancel | QDialogButtonBox::Save); QPushButton *discardButton = m_buttonBox->addButton(tr("Do &Not Save"), discardButtonRole); - m_buttonBox->button(QDialogButtonBox::Save)->setDefault(true); m_treeWidget->setFocus(); m_saveBeforeBuildCheckBox->setVisible(false); @@ -103,6 +102,8 @@ SaveItemsDialog::SaveItemsDialog(QWidget *parent, const QList<IDocument *> &item &SaveItemsDialog::collectItemsToSave); connect(discardButton, &QAbstractButton::clicked, this, &SaveItemsDialog::discardAll); connect(m_treeWidget, &QTreeWidget::itemSelectionChanged, this, &SaveItemsDialog::updateButtons); + + m_buttonBox->button(QDialogButtonBox::Save)->setDefault(true); } void SaveItemsDialog::setMessage(const QString &msg) |