<table><tr><td style="">emateli retitled this revision from "createKMessageBox tries to focus a default button when available" to "fix createKMessageBox focus button inconsistency".<br />emateli edited the summary of this revision. <a href="https://phabricator.kde.org/transactions/detail/PHID-XACT-DREV-zzct4gb3zjx77ys/" rel="noreferrer">(Show Details)</a>
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D7828" rel="noreferrer">View Revision</a></tr></table><br /><div><strong>CHANGES TO REVISION SUMMARY</strong><div><div style="white-space: pre-wrap; color: #74777D;">When creating dialogs <span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">with lists or checkboxes the focused item becomes either the list or the checkbox rather than any of the buttons.</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">via `createKMessageBox` in case the `QDialogButtonBox` parameter is parentless, the focus shifts from the left most button to any of the following in this order:<br />
<br />
# Message Label (if the AllowLink flag is present)<br />
# The string list (if it is not empty)<br />
# Checkbox confirmation (If present)</span><br />
<span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">In most cases the user would rather interact with the buttons through the keyboard rather than the checkbox.</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);"># Left most action button</span><br />
<br />
<span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">This patch checks if any of the buttons has the `isDefault` attribute and then focuses it</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">Moving the call of `setParent` of the `QDialogButtonBox` before any of the above mentioned widgets is created fixes this inconsistency</span>.</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D7828" rel="noreferrer">https://phabricator.kde.org/D7828</a></div></div><br /><div><strong>To: </strong>emateli, Frameworks, ngraham, aacid, VDG, rkflx<br /><strong>Cc: </strong>elvisangelaccio, rkflx, abetts, subdiff, ngraham, aacid, Frameworks<br /></div>