D29210: [NestedListHelper] Fix indentation of selection, add tests
Igor Poboiko
noreply at phabricator.kde.org
Thu Apr 30 15:04:59 BST 2020
poboiko added inline comments.
INLINE COMMENTS
> dfaure wrote in nestedlisthelper.cpp:225
> should the opposite happen? delete the list when decreasing indentation?
>
> Or is that what the blkFmt.setObjectIndex(-1); is about?
> A comment there would be useful...
>
> To me setObjectIndex(-1) sounds like it could kill any kind of embedded object there.... but I might be wrong.
We indeed delete it when decreasing, but here `delta > 0`, which corresponds to increasing :)
Regarding `setObjectIndex()`: it does indeed look like magic, and I don't totally understand it either. It was there, however, and it is also present in the official Qt `TextEdit` example, where it's used when item is removed from the list.
I've found more explicit way: just remove the block from list and set it's indentation to zero, it seems to be working well.
REVISION DETAIL
https://phabricator.kde.org/D29210
To: poboiko, #frameworks, dfaure, mlaurent
Cc: kde-frameworks-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20200430/ff4ff19a/attachment.html>
More information about the Kde-frameworks-devel
mailing list