Review Request 110511: Small cleanup of styles models
Elvis Stansvik
elvstone at gmail.com
Sat May 18 19:10:53 BST 2013
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/110511/
-----------------------------------------------------------
Review request for Calligra and Pierre Stirnweiss.
Description
-------
Following a TODO in the code, I've merged indexForParagraphStyle and indexForCharacterStyle into a single indexOf function. I also simplified DockerStylesComboModel a bit by introducing a private helper function to get either the character or paragraph style for a given style ID. All in all a reduction of about ~50 LoC.
(This patch also fixes bug #319048 by checking the index for validity in DockerStylesComboModel::styleApplied, so if this is accepted my RR from earlier today can be discarded).
This addresses bug 319048.
http://bugs.kde.org/show_bug.cgi?id=319048
Diffs
-----
plugins/textshape/dialogs/AbstractStylesModel.h 5ff2d56
plugins/textshape/dialogs/CharacterGeneral.cpp cb1b3ba
plugins/textshape/dialogs/DockerStylesComboModel.h 8c7d0dd
plugins/textshape/dialogs/DockerStylesComboModel.cpp 40ae007
plugins/textshape/dialogs/ParagraphGeneral.cpp 52b519a
plugins/textshape/dialogs/SimpleCharacterWidget.cpp cbeed19
plugins/textshape/dialogs/SimpleParagraphWidget.cpp d906a70
plugins/textshape/dialogs/StylesFilteredModelBase.h b39a5fa
plugins/textshape/dialogs/StylesFilteredModelBase.cpp 6aff291
plugins/textshape/dialogs/StylesModel.h cd8117a
plugins/textshape/dialogs/StylesModel.cpp 14b244a
plugins/textshape/dialogs/StylesWidget.cpp a7a7bc6
Diff: http://git.reviewboard.kde.org/r/110511/diff/
Testing
-------
Tested the styles combo and some styles related functionality after the change and everything seemed OK. And bug #319048 was fixed.
Thanks,
Elvis Stansvik
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/calligra-devel/attachments/20130518/1c3c18f9/attachment.htm>
More information about the calligra-devel
mailing list