<table><tr><td style="">emateli updated this revision to Diff 21453.<br />emateli added a comment.
</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><div><p>Well, the diff of this patch took a sizeable reduction.</p>
<p>I took a second look at this and here is what happened in the end and what caused the inconsistency with Dolphin.</p>
<p>The issue was that the <tt style="background: #ebebeb; font-size: 13px;">QDialogButtonBox</tt> argument, which contains the buttons needs to have a not null parent argument. If it does, then everything works as expected, if it doesn't (which Dolphin does not suppliy) then the focus is all messed up and will be given in order to the widgets created that can be focused.</p>
<p>From what I dug out the order seems to be:</p>
<ol class="remarkup-list">
<li class="remarkup-list-item">Label (if the <tt style="background: #ebebeb; font-size: 13px;">AllowLink</tt> flag is present)</li>
<li class="remarkup-list-item">The string list</li>
<li class="remarkup-list-item">Checkbox</li>
<li class="remarkup-list-item">Left most action button</li>
</ol>
<p>Moving the call of <tt style="background: #ebebeb; font-size: 13px;">setParent</tt> before any of the above mentioned widgets is created seems to fix this (I built this system-wide so all the KDE apps running can use it and no issues so far, although it's only been a couple of hours)</p>
<p>If this turns out to be okay, I'll edit the summary and title later, since it is re-purposed in a way by not involving widget focus change.</p></div></div><br /><div><strong>CHANGES SINCE LAST UPDATE</strong><div><a href="https://phabricator.kde.org/D7828?vs=20497&id=21453" rel="noreferrer">https://phabricator.kde.org/D7828?vs=20497&id=21453</a></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>AFFECTED FILES</strong><div><div>src/kmessagebox.cpp</div></div></div><br /><div><strong>To: </strong>emateli, Frameworks, ngraham, aacid, VDG<br /><strong>Cc: </strong>rkflx, abetts, subdiff, ngraham, aacid, Frameworks<br /></div>