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

List:       kwrite-devel
Subject:    Re: Review Request 117618: vimode: cleaning up the KateViReplaceMode class.
From:       "Michal Humpula" <michal.humpula () hudrydum ! cz>
Date:       2014-04-17 20:35:43
Message-ID: 20140417203543.11639.8575 () probe ! kde ! org
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


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


seems ok, except that one little refactor. Others are merely suggestions and \
curiosities.


src/vimode/katevireplacemode.h
<https://git.reviewboard.kde.org/r/117618/#comment39024>

    if you are doing clenaup, you can use explicit here, can you not?:)



src/vimode/katevireplacemode.h
<https://git.reviewboard.kde.org/r/117618/#comment39025>

    why another space here? Was it intentional?:) 



src/vimode/katevireplacemode.cpp
<https://git.reviewboard.kde.org/r/117618/#comment39026>

    this is strange, I don't see that characterAt method would account for different \
tabwidth. Are the tests missing for different tabwidth or was the implementation \
wrong in this detail?


- Michal Humpula


On April 17, 2014, 8:09 p.m., Miquel Sabaté Solà wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/117618/
> -----------------------------------------------------------
> 
> (Updated April 17, 2014, 8:09 p.m.)
> 
> 
> Review request for Kate, Michal Humpula and Simon St James.
> 
> 
> Repository: ktexteditor
> 
> 
> Description
> -------
> 
> This patch cleans up the KateViReplaceMode class a bit. In particular:
> 
> - Added documentation.
> - Added proper class access modifiers for the diferent functions implemented by \
>                 this class (not everything has to be public :P).
> - In the commandInsertFromLine method I've replaced the getCharAtVirtualColumn call \
>                 for doc()->characterAt. It's cleaner and less cumbersome :)
> - Cleaned up the includes.
> 
> 
> Diffs
> -----
> 
> src/vimode/katevireplacemode.h cf67ebb 
> src/vimode/katevireplacemode.cpp 5b3018c 
> 
> Diff: https://git.reviewboard.kde.org/r/117618/diff/
> 
> 
> Testing
> -------
> 
> All tests are passing.
> 
> 
> Thanks,
> 
> Miquel Sabaté Solà 
> 
> 


[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="https://git.reviewboard.kde.org/r/117618/">https://git.reviewboard.kde.org/r/117618/</a>
  </td>
    </tr>
   </table>
   <br />





 <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">seems ok, except that \
one little refactor. Others are merely suggestions and curiosities.</pre>  <br />







<div>




<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; \
border-collapse: collapse; margin: 2px padding: 2px;">  <thead>
  <tr>
   <th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; \
font-size: 9pt; padding: 4px 8px; text-align: left;">  <a \
href="https://git.reviewboard.kde.org/r/117618/diff/1/?file=266689#file266689line38" \
style="color: black; font-weight: bold; text-decoration: \
underline;">src/vimode/katevireplacemode.h</a>  <span style="font-weight: normal;">

     (Diff revision 1)

    </span>
   </th>
  </tr>
 </thead>



 
 

 <tbody>

  <tr>
    <th bgcolor="#e9eaa8" style="border-right: 1px solid #C0C0C0;" \
align="right"><font size="2">37</font></th>  <td bgcolor="#fdfebc" width="50%"><pre \
style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span \
class="n">KateViReplaceMode</span><span class="p">(</span><span \
class="n">KateViInputModeManager</span> <span class="o">*</span><span \
class="n">viInputModeManager</span><span class="p">,</span><span class="hl"> \
</span><span class="n"><span class="hl">KTextEditor</span></span><span \
class="o"><span class="hl">::</span></span><span class="n"><span \
class="hl">ViewPrivate</span></span><span class="hl"> </span><span class="o"><span \
class="hl">*</span></span><span class="n"><span class="hl">view</span></span><span \
class="p"><span class="hl">,</span></span><span class="hl"> </span><span \
class="n"><span class="hl">KateViewInternal</span></span><span class="hl"> \
</span><span class="o"><span class="hl">*</span></span><span class="n"><span \
class="hl">viewInternal</span></span><span class="p"><span \
class="hl">);</span></span></pre></td>  <th bgcolor="#e9eaa8" style="border-left: 1px \
solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font \
size="2">35</font></th>  <td bgcolor="#fdfebc" width="50%"><pre style="font-size: \
8pt; line-height: 140%; margin: 0; ">    <span \
class="n">KateViReplaceMode</span><span class="p">(</span><span \
class="n">KateViInputModeManager</span> <span class="o">*</span><span \
class="n">viInputModeManager</span><span class="p">,</span></pre></td>  </tr>

 </tbody>

</table>

<pre style="margin-left: 2em; white-space: pre-wrap; white-space: -moz-pre-wrap; \
white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">if you are \
doing clenaup, you can use explicit here, can you not?:)</pre> </div>
<br />

<div>




<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; \
border-collapse: collapse; margin: 2px padding: 2px;">  <thead>
  <tr>
   <th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; \
font-size: 9pt; padding: 4px 8px; text-align: left;">  <a \
href="https://git.reviewboard.kde.org/r/117618/diff/1/?file=266689#file266689line84" \
style="color: black; font-weight: bold; text-decoration: \
underline;">src/vimode/katevireplacemode.h</a>  <span style="font-weight: normal;">

     (Diff revision 1)

    </span>
   </th>
  </tr>
 </thead>



 
 

 <tbody>

  <tr>
    <th bgcolor="#e9eaa8" style="border-right: 1px solid #C0C0C0;" \
align="right"><font size="2">57</font></th>  <td bgcolor="#fdfebc" width="50%"><pre \
style="font-size: 8pt; line-height: 140%; margin: 0; "><span \
class="cp">#endif</span></pre></td>  <th bgcolor="#e9eaa8" style="border-left: 1px \
solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font \
size="2">78</font></th>  <td bgcolor="#fdfebc" width="50%"><pre style="font-size: \
8pt; line-height: 140%; margin: 0; "></pre></td>  </tr>

 </tbody>

</table>

<pre style="margin-left: 2em; white-space: pre-wrap; white-space: -moz-pre-wrap; \
white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">why another \
space here? Was it intentional?:) </pre> </div>
<br />

<div>




<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; \
border-collapse: collapse; margin: 2px padding: 2px;">  <thead>
  <tr>
   <th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; \
font-size: 9pt; padding: 4px 8px; text-align: left;">  <a \
href="https://git.reviewboard.kde.org/r/117618/diff/1/?file=266690#file266690line59" \
style="color: black; font-weight: bold; text-decoration: \
underline;">src/vimode/katevireplacemode.cpp</a>  <span style="font-weight: normal;">

     (Diff revision 1)

    </span>
   </th>
  </tr>
 </thead>



 
 

 <tbody>

  <tr>
    <th bgcolor="#e9eaa8" style="border-right: 1px solid #C0C0C0;" \
align="right"><font size="2">50</font></th>  <td bgcolor="#fdfebc" width="50%"><pre \
style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span \
class="n">QChar</span> <span class="n">ch</span> <span class="o">=</span> <span \
class="n">getCharAtVirtualColumn</span><span class="p">(</span><span \
class="n">line</span><span class="p">,</span> <span class="n">m_view</span><span \
class="o">-&gt;</span><span class="n">virtualCursorColumn</span><span \
class="p">(),</span> <span class="n">tabWidth</span><span \
class="p">);</span></pre></td>  <th bgcolor="#e9eaa8" style="border-left: 1px solid \
#C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font \
size="2">53</font></th>  <td bgcolor="#fdfebc" width="50%"><pre style="font-size: \
8pt; line-height: 140%; margin: 0; ">    <span class="n">QChar</span> <span \
class="n">ch</span> <span class="o">=</span> <span class="n">doc</span><span \
class="p">()</span><span class="o">-&gt;</span><span \
class="n">characterAt</span><span class="p">(</span><span \
class="n">target</span><span class="p">);</span></pre></td>  </tr>

 </tbody>

</table>

<pre style="margin-left: 2em; white-space: pre-wrap; white-space: -moz-pre-wrap; \
white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">this is \
strange, I don&#39;t see that characterAt method would account for different \
tabwidth. Are the tests missing for different tabwidth or was the implementation \
wrong in this detail?</pre> </div>
<br />



<p>- Michal Humpula</p>


<br />
<p>On April 17th, 2014, 8:09 p.m. UTC, Miquel Sabaté Solà wrote:</p>








<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" \
style="background-image: \
url('https://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 Kate, Michal Humpula and Simon St James.</div>
<div>By Miquel Sabaté Solà .</div>


<p style="color: grey;"><i>Updated April 17, 2014, 8:09 p.m.</i></p>









<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt;">Repository: </b>
ktexteditor
</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;">This patch cleans up the KateViReplaceMode class a bit. In particular:

- Added documentation.
- Added proper class access modifiers for the diferent functions implemented by this \
                class (not everything has to be public :P).
- In the commandInsertFromLine method I&#39;ve replaced the getCharAtVirtualColumn \
                call for doc()-&gt;characterAt. It&#39;s cleaner and less cumbersome \
                :)
- Cleaned up the includes.</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;">All tests are passing.</pre>  </td>
 </tr>
</table>


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

 <li>src/vimode/katevireplacemode.h <span style="color: grey">(cf67ebb)</span></li>

 <li>src/vimode/katevireplacemode.cpp <span style="color: grey">(5b3018c)</span></li>

</ul>

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







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








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



_______________________________________________
KWrite-Devel mailing list
KWrite-Devel@kde.org
https://mail.kde.org/mailman/listinfo/kwrite-devel


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

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