Review Request 122278: Additional changes in section handling

Camilla Boemann cbr at boemann.dk
Thu Jan 29 14:33:32 GMT 2015



> On Jan. 27, 2015, 7:34 p.m., Camilla Boemann wrote:
> > libs/kotext/commands/DeleteCommand.cpp, line 321
> > <https://git.reviewboard.kde.org/r/122278/diff/1/?file=345394#file345394line321>
> >
> >     yikes
> 
> Denis Kuplyakov wrote:
>     QVariant before was used like static_cast<KoSection*>(v.value<void*>()). And this structure only for local use, doesn't look dangerous for me.
> 
> Camilla Boemann wrote:
>     well why do we have both KoSection and KoSectionEnd and not just say KoSectionDelimiter that handles both. Just wondering - not saying it has to be like that
> 
> Denis Kuplyakov wrote:
>     This is entirely different entities: KoSection has many things like own style, name and so on (and I can't say that delimiter could have style). And KoSectionEnd is a simple helper class that links to corresponding KoSection.

yes but still having a void pointer is very hard for me to accept. Can we have two different pointers then. with the opposite set to 0


- Camilla


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/122278/#review74840
-----------------------------------------------------------


On Jan. 28, 2015, 8:21 p.m., Denis Kuplyakov wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/122278/
> -----------------------------------------------------------
> 
> (Updated Jan. 28, 2015, 8:21 p.m.)
> 
> 
> Review request for Calligra, Camilla Boemann and Inge Wallin.
> 
> 
> Repository: calligra
> 
> 
> Description
> -------
> 
> This all things that I have done after GSoC, but they seems not be in master by now.
> 
> 1) Added special functions to retrive startings and endings. Changed all accesses to use this functions from KoSectionUtils. Also extracted some section related functionality to KoSectionUtils.
> 
> 2) Fixed wrong indication of section level.
> 
> 3) There were no invalidate send to KoSectionManager after paste to update section level.
> 
> 4) Added KoSection and KoSectionEnd to Metatype system
>    
>    This allowed to reduce number of QVariant casts allwhere
>    sections are used. Also fixed some missing usings of
>    KoSectionUtils functions.
>    
> 5) Deleted unused code somewhere.
> 
> 6) KoSectionManager doesn't store QStandardItemModel now, but can generate it on update. Extracted KoSectionManagerPrivate to cpp file back and changed QScopedPointer to usual pointer for MS VC compiler. Now there is a set of all ever registered sections in KoSectionManager, cuz there are sections that store in memory but cannot be deleted due to possible undo.
> 
> 7) Bug with "Incorrect name" is fixed, if you try to rename section with name that existed before.
> 
> 
> Diffs
> -----
> 
>   plugins/textshape/dialogs/SimpleInsertWidget.cpp b5500ae 
>   words/part/dockers/KWDebugWidget.cpp 2aa53c0 
>   libs/kotext/KoSectionManager.h dc4821f 
>   libs/kotext/KoSectionManager.cpp df4e535 
>   libs/kotext/KoSectionUtils.h 1bd5eb3 
>   libs/kotext/KoSectionUtils.cpp cbcefd5 
>   libs/kotext/KoTextPaste.cpp 08c6cf8 
>   libs/kotext/commands/DeleteCommand.cpp 7c69df7 
>   libs/kotext/commands/NewSectionCommand.cpp 50ba14d 
>   libs/kotext/opendocument/KoTextLoader.cpp fe4713a 
>   libs/kotext/opendocument/KoTextWriter_p.cpp 0e4ea11 
>   libs/kotext/tests/TestKoTextEditor.cpp a4b02c0 
>   libs/textlayout/KoTextLayoutArea_paint.cpp d6fa3b8 
>   plugins/textshape/dialogs/SectionFormatDialog.cpp c825fd2 
>   libs/kotext/KoSection.h 8183958 
>   libs/kotext/KoSection.cpp a651fd4 
>   libs/kotext/KoSectionEnd.h 0005851 
>   libs/kotext/KoSectionEnd.cpp 0d7cf83 
> 
> Diff: https://git.reviewboard.kde.org/r/122278/diff/
> 
> 
> Testing
> -------
> 
> Have played with sections a bit (deleting, inserting, renaming, undo). And DeleteCommand for sections unittest is passing. Seems to be OK.
> 
> 
> Thanks,
> 
> Denis Kuplyakov
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/calligra-devel/attachments/20150129/0a2e6fde/attachment.htm>


More information about the calligra-devel mailing list