Assign role 'NoRole' instead of 'Accept' to not mess with button order

This commit is contained in:
Janek Bevendorff 2017-02-26 18:47:36 +01:00 committed by Jonathan White
parent 4ec2fe556a
commit 04b3b3dbc5

View File

@ -165,7 +165,7 @@ void DatabaseTabWidget::openDatabase(const QString& fileName, const QString& pw,
msgBox.setIcon(QMessageBox::Question);
msgBox.addButton(QMessageBox::Yes);
msgBox.addButton(QMessageBox::No);
auto readOnlyButton = msgBox.addButton(tr("Open read-only"), QMessageBox::AcceptRole);
auto readOnlyButton = msgBox.addButton(tr("Open read-only"), QMessageBox::NoRole);
msgBox.setDefaultButton(readOnlyButton);
msgBox.setEscapeButton(QMessageBox::No);
auto result = msgBox.exec();