D28986: API dox: document Q_DECLARE_FLAGS-based flags

Friedrich W. H. Kossebau noreply at phabricator.kde.org
Sun Apr 19 18:30:19 BST 2020


kossebau added inline comments.

INLINE COMMENTS

> dfaure wrote in kjob.h:99
> Inexperienced developers might be confused by the OR in there.
> In English it sounds like exclusive or, while the whole point of Q_DECLARE_FLAGS is that multiple flags can be set at the same time.
> 
> Why not just say "Stores a combination of" ?

I had myself inspired by the wording of https://doc.qt.io/qt-5/qflags.html and similar of Qt docs for flags like https://doc.qt.io/qt-5/qwidget.html#RenderFlag-enum, which currently also talk about 
"The QFlags class provides a type-safe way of storing OR-combinations of enum values"
or
 "The RenderFlags type is a typedef for QFlags<RenderFlag>. It stores an OR combination of RenderFlag values."

But I tend to think you have a point, the OR here is not really needed and rather confusing, Will update.

REPOSITORY
  R244 KCoreAddons

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

To: kossebau, #frameworks, dfaure
Cc: kde-frameworks-devel, LeGast00n, cblack, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20200419/93dddfcb/attachment-0001.html>


More information about the Kde-frameworks-devel mailing list