[prev in list] [next in list] [prev in thread] [next in thread] 

List:       calligra-devel
Subject:    Review Request 110511: Small cleanup of styles models
From:       "Elvis Stansvik" <elvstone () gmail ! com>
Date:       2013-05-18 18:10:53
Message-ID: 20130518181053.24443.16644 () vidsolbach ! de
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


-----------------------------------------------------------
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


[Attachment #5 (text/html)]

<html>
 <body>
  <div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
   <table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 solid;">
    <tr>
     <td>
      This is an automatically generated e-mail. To reply, visit:
      <a href="http://git.reviewboard.kde.org/r/110511/">http://git.reviewboard.kde.org/r/110511/</a>
     </td>
    </tr>
   </table>
   <br />




<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: \
url('http://git.reviewboard.kde.org/static/rb/images/review_request_box_top_bg.ab6f3b1072c9.png'); \
background-position: left top; background-repeat: repeat-x; border: 1px black solid;">  <tr>
  <td>

<div>Review request for Calligra and Pierre Stirnweiss.</div>
<div>By Elvis Stansvik.</div>







<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
 <table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid \
#b8b5a0">  <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Following a TODO in the code, I&#39;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).</pre>  </td>
 </tr>
</table>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
 <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Tested the styles combo and some styles \
related functionality after the change and everything seemed OK. And bug #319048 was fixed.</pre>  </td>
 </tr>
</table>



<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Bugs: </b>


 <a href="http://bugs.kde.org/show_bug.cgi?id=319048">319048</a>


</div>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">

 <li>plugins/textshape/dialogs/AbstractStylesModel.h <span style="color: grey">(5ff2d56)</span></li>

 <li>plugins/textshape/dialogs/CharacterGeneral.cpp <span style="color: grey">(cb1b3ba)</span></li>

 <li>plugins/textshape/dialogs/DockerStylesComboModel.h <span style="color: grey">(8c7d0dd)</span></li>

 <li>plugins/textshape/dialogs/DockerStylesComboModel.cpp <span style="color: grey">(40ae007)</span></li>

 <li>plugins/textshape/dialogs/ParagraphGeneral.cpp <span style="color: grey">(52b519a)</span></li>

 <li>plugins/textshape/dialogs/SimpleCharacterWidget.cpp <span style="color: grey">(cbeed19)</span></li>

 <li>plugins/textshape/dialogs/SimpleParagraphWidget.cpp <span style="color: grey">(d906a70)</span></li>

 <li>plugins/textshape/dialogs/StylesFilteredModelBase.h <span style="color: grey">(b39a5fa)</span></li>

 <li>plugins/textshape/dialogs/StylesFilteredModelBase.cpp <span style="color: \
grey">(6aff291)</span></li>

 <li>plugins/textshape/dialogs/StylesModel.h <span style="color: grey">(cd8117a)</span></li>

 <li>plugins/textshape/dialogs/StylesModel.cpp <span style="color: grey">(14b244a)</span></li>

 <li>plugins/textshape/dialogs/StylesWidget.cpp <span style="color: grey">(a7a7bc6)</span></li>

</ul>

<p><a href="http://git.reviewboard.kde.org/r/110511/diff/" style="margin-left: 3em;">View Diff</a></p>







  </td>
 </tr>
</table>




  </div>
 </body>
</html>



_______________________________________________
calligra-devel mailing list
calligra-devel@kde.org
https://mail.kde.org/mailman/listinfo/calligra-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic