D29138: [Solid] Replace foreach (deprecated) with range/index for

Ahmad Samir noreply at phabricator.kde.org
Sat Apr 25 18:24:34 BST 2020


ahmadsamir added inline comments.

INLINE COMMENTS

> bruns wrote in fakeopticaldisc.cpp:43
> You are contradicting yourself. You use value() for content, but for supportedMedia it is a bad idea? Also, `supportedMedia |= 0` is obviously a noop, while for any named flag one has to lookup the flag value.

I was talking about something like Solid::OpticalDrive::MediumType(0); ContentType has Solid::OpticalDisc::NoContent whereas MediumType has nothing similar.

IIUC named casts are preferred over old style casts, so I suggest either we add a MediumType enumerator e.g. NotSupported = 0x00000 or use a static_cast.

REPOSITORY
  R245 Solid

BRANCH
  l-foreach (branched from master)

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

To: ahmadsamir, #frameworks, dfaure, apol, meven
Cc: bruns, kde-frameworks-devel, LeGast00n, cblack, michaelh, ngraham
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20200425/62c0b14e/attachment.html>


More information about the Kde-frameworks-devel mailing list