D5181: API dox: fix missing note to call setXMLFile with KParts::MainWindow

Friedrich W. H. Kossebau noreply at phabricator.kde.org
Sun Mar 26 16:49:06 UTC 2017


kossebau added a comment.


  In https://phabricator.kde.org/D5181#97662, @dfaure wrote:
  
  > Not sure which solution is better.
  
  
  Considered that alternative as well, but then chose to propose the given patch for these reasons:
  
  - code supporting KF <5.34 would still need some patching, just having the extra `setXMLFile(...)` line without #if-version is less complex code
  - lxr.kde.org hints that lots of existing code uses `setXMLFile(...)`, so restoring old API dox hint would match code that exists
  - 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
  
  (all assuming  non-standard ui.rc filename of course :) )
  
  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.
   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.

REPOSITORY
  R306 KParts

REVISION DETAIL
  https://phabricator.kde.org/D5181

To: kossebau, elvisangelaccio, #frameworks, dfaure
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20170326/3946569e/attachment.html>


More information about the Kde-frameworks-devel mailing list