D5161: Use {} as default value for zero-set flags, not nullptr

Friedrich W. H. Kossebau noreply at phabricator.kde.org
Thu Mar 23 21:25:51 UTC 2017


kossebau created this revision.
Restricted Application added a subscriber: kdevelop-devel.

REVISION SUMMARY
  For some human code readers nullptr seems akward with bitflags,
  (even more as QFlags is int-based -> sizeof). On quick reading
  seeing a nullptr with unknown type even might result in wrong
  assumption of a pointer type.
  So for mental sanity of some of us using default constructor instead,
  which still needs people to know it defaults to no bits set,
  but that might be expected, as 0 is a usual default.

REPOSITORY
  R33 KDevPlatform

BRANCH
  donotusenullptrforflags

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

AFFECTED FILES
  language/duchain/navigation/useswidget.h
  shell/documentcontroller.cpp
  shell/watcheddocumentset.cpp
  util/multilevellistview.h
  vcs/widgets/standardvcslocationwidget.h
  vcs/widgets/vcslocationwidget.h

To: kossebau, #kdevelop
Cc: kdevelop-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20170323/fff1f2eb/attachment.html>


More information about the KDevelop-devel mailing list