Correct anchor detection in QML components.
ClosedPublic

Authored by dcaliste on Aug 27 2019, 1:32 PM.

Details

Summary

The loop to translate the anchor shape position in TextDocumentImpl was mis-written, always testing shape's parent, instead of parent's parent. This was creating an infinite loop in case an email address was present in a table for instance.

Diff Detail

Repository
R8 Calligra
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
dcaliste created this revision.Aug 27 2019, 1:32 PM
Restricted Application added a subscriber: Calligra-Devel-list. · View Herald TranscriptAug 27 2019, 1:32 PM
dcaliste requested review of this revision.Aug 27 2019, 1:32 PM

Indeed that doesn't look like a good loop, if triggered once, nothing affecting the break out condition inside of it. But isn't the same thing happening also at the beginning of this method, and actually same kind of construct being there in spreadsheet and presentation impls too?

leinir accepted this revision.Aug 30 2019, 11:33 AM

Oh dear, yes, took a moment. Well spotted indeed!

This revision is now accepted and ready to land.Aug 30 2019, 11:33 AM
dcaliste updated this revision to Diff 65201.Sep 2 2019, 6:59 AM

Thank you pvuorela pointing out other places for this construct. I've updated the patch with a fix for the faulty loops for spreadsheets and presentations also.

pvuorela accepted this revision.Sep 2 2019, 12:40 PM

Having a bit strange rendering for TextDocumentImpl.cpp changes here, but the raw diff looks good now. Trust all good :)

And even rendering now better, no idea what happened.

This revision was automatically updated to reflect the committed changes.