<table><tr><td style="">kossebau 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/D5181" rel="noreferrer">View Revision</a></tr></table><br /><div><div><blockquote style="border-left: 3px solid #8C98B8;
color: #6B748C;
font-style: italic;
margin: 4px 0 12px 0;
padding: 8px 12px;
background-color: #F8F9FC;">
<div style="font-style: normal;
padding-bottom: 4px;">In <a href="https://phabricator.kde.org/D5181#97662" style="background-color: #e7e7e7;
border-color: #e7e7e7;
border-radius: 3px;
padding: 0 4px;
font-weight: bold;
color: black;text-decoration: none;" rel="noreferrer">D5181#97662</a>, <a href="https://phabricator.kde.org/p/dfaure/" style="
border-color: #f1f7ff;
color: #19558d;
background-color: #f1f7ff;
border: 1px solid transparent;
border-radius: 3px;
font-weight: bold;
padding: 0 4px;" rel="noreferrer">@dfaure</a> wrote:</div>
<div style="margin: 0;
padding: 0;
border: 0;
color: rgb(107, 116, 140);"><p>Not sure which solution is better.</p></div>
</blockquote>
<p>Considered that alternative as well, but then chose to propose the given patch for these reasons:</p>
<ul class="remarkup-list">
<li class="remarkup-list-item">code supporting KF <5.34 would still need some patching, just having the extra <tt style="background: #ebebeb; font-size: 13px;">setXMLFile(...)</tt> line without #if-version is less complex code</li>
<li class="remarkup-list-item">lxr.kde.org hints that lots of existing code uses <tt style="background: #ebebeb; font-size: 13px;">setXMLFile(...)</tt>, so restoring old API dox hint would match code that exists</li>
<li class="remarkup-list-item">code not for KParts::MainWindow which does not pass the Create flag would need to call createGUI anyway and one would then pass a non-standard ui.rc filename in that call</li>
</ul>
<p>(all assuming non-standard ui.rc filename of course :) )</p>
<p>The xmlfile argument with the setupGUI() calls feels to be bound to the Create flag and not related to the other flags. So if the flag is not passed, that argument instintively feels like it should be ignored then.<br />
Adding support in code and related notion in API dox seems like a convenience hack done extra for KParts::MainWindow, where there should be rather special code in KParts::MainWindow itself to handle its specifics of the UI setup. Even if setupGUI() is a convenience method itself, but that seems too much of kitchen-sync. IMHO :) Close call, I agree.</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R306 KParts</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D5181" rel="noreferrer">https://phabricator.kde.org/D5181</a></div></div><br /><div><strong>To: </strong>kossebau, elvisangelaccio, Frameworks, dfaure<br /></div>