[Differential] [Accepted] D2075: Fix bug in kfiledialog.cpp that causes crashing when native widgets are used.

Kevin Funk noreply at phabricator.kde.org
Thu Jan 12 08:17:21 UTC 2017


kfunk accepted this revision.
kfunk added a comment.
This revision is now accepted and ready to land.


  In https://phabricator.kde.org/D2075#76591, @jonathans wrote:
  
  > They interrupt the logical flow of the code, and because the conditionally executed code no longer sits inside an indented block, make it less evident to the reader that it is conditionally executed.
  
  
  Interesting claim that "not using early returns" makes the code more readable -- please have a look at the discussion on http://softwareengineering.stackexchange.com/questions/18454/should-i-return-from-a-function-early-or-use-an-if-statement  -- I agree that you could consider KFileDialog having modes of operations though -- there having early returns could limit the extensibility in case you ever wanted to introduce another mode.
  
  Anyhow, I don't care too much for this deprecated code base. This patch looks fine semantically, and fixes a bug => so let's go for it.
  
  I'd wait for another +1 from someone else.

REPOSITORY
  R239 KDELibs4Support

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

EMAIL PREFERENCES
  https://phabricator.kde.org/settings/panel/emailpreferences/

To: jonathans, #frameworks, dfaure, kfunk
Cc: kfunk, aacid
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20170112/0b0cdb98/attachment.html>


More information about the Kde-frameworks-devel mailing list