Make sure for loop does not detach
ClosedPublic

Authored by gladhorn on Jul 25 2018, 6:50 AM.

Diff Detail

Repository
R110 KScreen Library
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
gladhorn created this revision.Jul 25 2018, 6:50 AM
Restricted Application added a project: Plasma. · View Herald TranscriptJul 25 2018, 6:50 AM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
gladhorn requested review of this revision.Jul 25 2018, 6:50 AM
broulik added inline comments.
src/config.cpp
370–371

This still calls config->outputs().begin() and might detach, wouldn't it?
qAsConst also doesn't work for return value of a method call, so looks like you're gonna have to store it in a const variable first

gladhorn updated this revision to Diff 38426.Jul 25 2018, 1:54 PM

Use a temporary const for ranged for

davidedmundson accepted this revision.Jul 27 2018, 10:14 AM
This revision is now accepted and ready to land.Jul 27 2018, 10:14 AM
This revision was automatically updated to reflect the committed changes.