Make it compiles without foreach
ClosedPublic

Authored by mlaurent on Feb 23 2019, 1:30 PM.

Diff Detail

Repository
R243 KArchive
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 23 2019, 1:30 PM
Restricted Application added a project: Frameworks. · View Herald TranscriptFeb 23 2019, 1:30 PM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
mlaurent requested review of this revision.Feb 23 2019, 1:30 PM
dfaure requested changes to this revision.Feb 23 2019, 6:54 PM
dfaure added inline comments.
src/krcc.cpp
147

move to temp var to avoid detaching?

This revision now requires changes to proceed.Feb 23 2019, 6:54 PM
mlaurent added inline comments.Feb 23 2019, 10:25 PM
src/krcc.cpp
147

dir is const. Will it detach ?

dfaure accepted this revision.Feb 24 2019, 8:11 AM

Ah, no, you're right.

I remembered that there was a problem with function calls (rvalues) but that problem is not what I thought, it's the fact that one can't write qAsConst(myFunc()) (because the return value gets destroyed before it's used).
But if the rvalue is const already, no problem.

This revision is now accepted and ready to land.Feb 24 2019, 8:11 AM
This revision was automatically updated to reflect the committed changes.