[Kconfig] Compile without foreach
ClosedPublic

Authored by mlaurent on Feb 26 2019, 6:04 AM.

Details

Summary

compile without foreach

Test Plan

Unittest Ok as previously

Diff Detail

Repository
R237 KConfig
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
mlaurent created this revision.Feb 26 2019, 6:04 AM
Restricted Application added a project: Frameworks. · View Herald TranscriptFeb 26 2019, 6:04 AM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
mlaurent requested review of this revision.Feb 26 2019, 6:04 AM
mlaurent retitled this revision from Compile without foreach to [Kconfig] Compile without foreach.Feb 26 2019, 12:59 PM
dfaure requested changes to this revision.Feb 27 2019, 11:32 PM

Did you check that unittests still pass? (please mention this in the "Test Plan:" field of the commit when using arc diff)

src/core/ksharedconfig.cpp
93

This looks like a poor man's qAsConst.
Would this work with

for (auto cfg : qAsConst(*list)) {

?
(not sure)

This revision now requires changes to proceed.Feb 27 2019, 11:32 PM
mlaurent updated this revision to Diff 52808.Feb 28 2019, 12:20 PM

Fixed code as requested by David

mlaurent edited the test plan for this revision. (Show Details)Feb 28 2019, 12:21 PM
dfaure accepted this revision.Mar 2 2019, 10:24 PM
This revision is now accepted and ready to land.Mar 2 2019, 10:24 PM
This revision was automatically updated to reflect the committed changes.