From calligra-devel Tue Mar 26 09:20:17 2013 From: Pierre Stirnweiss Date: Tue, 26 Mar 2013 09:20:17 +0000 To: calligra-devel Subject: Re: Review Request 109651: Refactor style manager Message-Id: X-MARC-Message: https://marc.info/?l=calligra-devel&m=136428965303402 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--===============5499872054164880682==" --===============5499872054164880682== Content-Type: multipart/alternative; boundary=047d7bea35184694e504d8d06ff6 --047d7bea35184694e504d8d06ff6 Content-Type: text/plain; charset=ISO-8859-1 Sorry not to get back to you, I had to reinstall my box and am still not completely operational. As Thorsten said, we decided (on the phone) that his patch was a welcomed fix for a crash. What i am working on is way more intrusive. All I have left to do on my box is to set back my development environment and restore my repo from the backup. I'll try to do that during the week. See you soon, Pierre On Mon, Mar 25, 2013 at 11:22 AM, C. Boemann wrote: > This is an automatically generated e-mail. To reply, visit: > http://git.reviewboard.kde.org/r/109651/ > > Ship it! > > I have only a small issue. After that you are free to push > > > libs/textlayout/KoStyleThumbnailer.cpp (Diff > revision 3) > > QImage KoStyleThumbnailer::thumbnail(KoCharacterStyle *characterStyle, KoParagraphStyle *paragraphStyle, QSize size, bool recreateThumbnail, KoStyleThumbnailerFlags flags) > > 157 > > int paragraphStyleId = (paragraphStyle)?paragraphStyle->styleId():0; > > 160 > > unsigned long paragraphStyleId = (paragraphStyle) ? reinterpret_cast(paragraphStyle) : 0L; > > paragraphStyleId seems a misnomer now > > > - C. > > On March 25th, 2013, 5:28 a.m. UTC, Thorsten Zachmann wrote: > Review request for Calligra and Pierre Stirnweiss. > By Thorsten Zachmann. > > *Updated March 25, 2013, 5:28 a.m.* > Description > > This patch tries to fix the problems/crashes which happen in the style manager. > > To get the simple crash open the default document and click on the edit button of the None (character style) > > The patch uses a different model for the style manager and temporary styles that get modified to only apply the changes once the user applies them. > The model changes the internal pointer to the temporary files once they are selected and when applied resets to the original ones. > However the styles preview in the styles manager list is updated immediately. > The patch simplifies the handling quite a bit. > > I did not know that Pierre was also working on that so I publish it now so we have something we can discuss. > > If you like this I would like to backport it to 2.6 as it fixes quite some grave bugs compared to what we have now. > > Testing > > Tested modification without saving. > Tested applying. > Tested Ok. > Tested Canceling > > Diffs > > - libs/kotext/styles/KoCharacterStyle.h (2fdde12) > - libs/textlayout/KoStyleThumbnailer.cpp (436b243) > - plugins/textshape/CMakeLists.txt (084628c) > - plugins/textshape/dialogs/CharacterGeneral.h (e6d99db) > - plugins/textshape/dialogs/CharacterGeneral.cpp (d3eead6) > - plugins/textshape/dialogs/ParagraphGeneral.h (1a78376) > - plugins/textshape/dialogs/ParagraphGeneral.cpp (ad30369) > - plugins/textshape/dialogs/StyleManager.h (dec3b6b) > - plugins/textshape/dialogs/StyleManager.cpp (9c82c11) > - plugins/textshape/dialogs/StylesManagerModel.h (PRE-CREATION) > - plugins/textshape/dialogs/StylesManagerModel.cpp (PRE-CREATION) > - plugins/textshape/dialogs/StylesSortFilterProxyModel.h (PRE-CREATION) > - plugins/textshape/dialogs/StylesSortFilterProxyModel.cpp > (PRE-CREATION) > > View Diff > --047d7bea35184694e504d8d06ff6 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Sorry not to get back to you, I had to reinstall my box and am still not co= mpletely operational.
As Thorsten said, we decided (on the phone) that h= is patch was a welcomed fix for a crash. What i am working on is way more i= ntrusive.

All I have left to do on my box is to set back my development environme= nt and restore my repo from the backup. I'll try to do that during the = week.

See you soon,

Pierre


On Mon, Mar 25, 2013 at 11:22 AM, C. Boemann <cbr@boemann.dk> = wrote:
This is an automatically generated e-mail. To reply, visit: http://git.reviewboard.kde.org/r/109651/

Ship it!

I have only a small =
issue. After that you are free to push

QImage KoStyleThumbnailer::thumbnail(KoCharacterStyle *characterStyle, KoP=
aragraphStyle *paragraphStyle, QSize size, bool recreateThumbnail, KoStyleT=
humbnailerFlags flags)
=20 =20
libs/textlayout/KoStyleThumbnailer.cpp (Diff revision 3)
157
    int paragraphStyl=
eId =3D (paragraphStyle=
)?paragraphStyle-=
>styleId():0;

160
    unsigned <=
span>long paragraphStyleId =3D (paragraphStyle) ? reinterpret_cast<unsigned =
long>(<=
/span>paragraphStyle) <=
span>: 0L;=
parag=
raphStyleId seems a misnomer now

- C.


On March 25th, 2013, 5:28 a.m. UTC, Thorsten Zachmann wrote:

Review request for Calligra and Pierre Stirnweiss.
By Thorsten Zachmann.

Updated March 25, 2013, 5:28 a.m.

Descripti= on

This patch tries to fix the problems/crashes which happen in the style man=
ager.=20

To get the simple crash open the default document and click on the edit but=
ton of the None (character style)

The patch uses a different model for the style manager and temporary styles=
 that get modified to only apply the changes once the user applies them.
The model changes the internal pointer to the temporary files once they are=
 selected and when applied resets to the original ones.
However the styles preview in the styles manager list is updated immediatel=
y.
The patch simplifies the handling quite a bit.

I did not know that Pierre was also working on that so I publish it now so =
we have something we can discuss.

If you like this I would like to backport it to 2.6 as it fixes quite some =
grave bugs compared to what we have now.

Testing

Tested modification without saving.
Tested applying.
Tested Ok.
Tested Canceling

Diffs

  • libs/kotext/styles/KoCharacterStyle.h (2fdd= e12)
  • libs/textlayout/KoStyleThumbnailer.cpp (436= b243)
  • plugins/textshape/CMakeLists.txt (084628c)<= /span>
  • plugins/textshape/dialogs/CharacterGeneral.h (e6d99db)
  • plugins/textshape/dialogs/CharacterGeneral.cpp (d3eead6)
  • plugins/textshape/dialogs/ParagraphGeneral.h (1a78376)
  • plugins/textshape/dialogs/ParagraphGeneral.cpp (ad30369)
  • plugins/textshape/dialogs/StyleManager.h (d= ec3b6b)
  • plugins/textshape/dialogs/StyleManager.cpp = (9c82c11)
  • plugins/textshape/dialogs/StylesManagerModel.h (PRE-CREATION)
  • plugins/textshape/dialogs/StylesManagerModel.cpp (PRE-CREATION)
  • plugins/textshape/dialogs/StylesSortFilterProxyModel.h (PRE-CREATION)
  • plugins/textshape/dialogs/StylesSortFilterProxyModel.cpp (PRE-CREATION)

View Diff


--047d7bea35184694e504d8d06ff6-- --===============5499872054164880682== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ calligra-devel mailing list calligra-devel@kde.org https://mail.kde.org/mailman/listinfo/calligra-devel --===============5499872054164880682==--