D13532: Code cleanup on the Profile Settings

Tomaz Canabrava noreply at phabricator.kde.org
Thu Jun 14 12:14:08 UTC 2018


tcanabrava created this revision.
Restricted Application added a project: Konsole.
Restricted Application added a subscriber: konsole-devel.
tcanabrava requested review of this revision.

REVISION SUMMARY
  Favor manual list creator over for loop for small list
  
  Three items, create them manually, cleaner and less
  computationally expensive.
  
  Btw - this is ugly, both ways. I blame QStandardItemModel.
  
  Simplify Logic
  
  Use auto when types are explicit
  
  Simplify Logic: use ternary when it improves readability
  
  Stack when heap's uneeded.
  
  There's absolutely no point on creating a QPointer
  and manually deleting the item later. Just create
  the variable on the stack
  
  Auto when type's explicit

REPOSITORY
  R319 Konsole

BRANCH
  ProfileSettingsCleanup

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

AFFECTED FILES
  src/settings/ProfileSettings.cpp
  src/settings/ProfileSettings.h

To: tcanabrava
Cc: konsole-devel, herrold, ngraham, maximilianocuria, hindenburg
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/konsole-devel/attachments/20180614/5c188a12/attachment.html>


More information about the konsole-devel mailing list