SG-41009: Add alertPanelWithCheckBox #989
Closed
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.
SG-41009: Add alertPanelWithCheckBox
Summarize your change.
QAlertPanel was updated to handle rich text for hyperlinks in the body message and to display a check box with a message. To avoid changing the
alertPanelcommand that is used in different part of the code, a newalertPanelWithCheckBoxwas added, but both commands are sharing the same logic that was moved insideshowAlertPanel. The only differences are the addition of a check box text parameter in the new command with a tuple return type of(buttonResult, isCheckBoxChecked)instead of just thebuttonResultas an int. I also made a small change to thealertPanelso that the title is only added in the message itself ifisSheetis True for macOS. In that case, the title is in bold to differentiate it from the reste of the text. On Linux and Windows or ifisSheetis False on macOS, the title is simply added to the window title.Describe the reason for the change.
A new confirmation modal in the Live Review plugin needs to display a link and a check box for the user to decide if the message should be shown again or not in the futur.
Describe what you have tested and on which operating system.
The confirmation panel was tested on macOS 15.6.1.