Make 'No' button default in Unknown Certificate dialog#11540
Merged
TheOneRing merged 1 commit intomasterfrom Mar 15, 2024
Merged
Make 'No' button default in Unknown Certificate dialog#11540TheOneRing merged 1 commit intomasterfrom
TheOneRing merged 1 commit intomasterfrom
Conversation
Contributor
|
The ui tests have multiple crashes in the tls dialog, please have a look. |
3e35089 to
f0c7f3e
Compare
TheOneRing
reviewed
Mar 15, 2024
src/gui/tlserrordialog.cpp
Outdated
|
|
||
| // Try to set the No-button (the reject button) as the default | ||
| if (QPushButton *noButton = _ui->buttonBox->button(QDialogButtonBox::No)) { | ||
| Q_ASSERT(_ui->buttonBox->buttonRole(noButton) == QDialogButtonBox::RejectRole || _ui->buttonBox->buttonRole(noButton) == QDialogButtonBox::NoRole); |
Contributor
There was a problem hiding this comment.
Hmm according to https://doc.qt.io/qt-6/qdialogbuttonbox.html#ButtonRole-enum it is supposed to always be NoRole?
Contributor
Author
There was a problem hiding this comment.
But how can clicking the "No" button then reject the dialog?
Contributor
Author
There was a problem hiding this comment.
ah, in QDialogButtonBoxPrivate::_q_handleButtonClicked():
case QPlatformDialogHelper::RejectRole:
case QPlatformDialogHelper::NoRole:
emit q->rejected();
break;
Contributor
Author
There was a problem hiding this comment.
I removed the assert, it's superfluous to check the NoRole on the "No" button.
f0c7f3e to
a5763ec
Compare
TheOneRing
approved these changes
Mar 15, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes: #11531