[prev in list] [next in list] [prev in thread] [next in thread]
List: kwrite-devel
Subject: Re: Review Request 117634: vimode: implemented the ctrl-w and the ctrl-u commands in replace mode.
From: Miquel_Sabaté_Solà <mikisabate () gmail ! com>
Date: 2014-04-18 18:45:29
Message-ID: 20140418184529.11639.40193 () probe ! kde ! org
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
> On April 18, 2014, 5:59 p.m., Michal Humpula wrote:
> > src/vimode/katevireplacemode.cpp, line 111
> > <https://git.reviewboard.kde.org/r/117634/diff/1/?file=266940#file266940line111>
> >
> > same goes for every adjusted return statement in this function:
> >
> > The handleKeypress uses return value for singnaling whether this key was handled \
> > or should be passed to regular key processing (might trigger the shortcut at the \
> > end). Functions like startNormalMode use booleas to signal, whether they were \
> > successfull (let's forget for a moment that most of them return true always). Are \
> > you sure, that you want to put "==" between those two meanings? In other words, \
> > does unsuccesfull return from startNormalMode means that we are not handling this \
> > key press altough we might have already altered the internal state somehow?
You're right. Even if these two meanings are bools, conceptually they are different \
and I shouldn't be mixing them. Fixed! :)
- Miquel
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/117634/#review56031
-----------------------------------------------------------
On April 18, 2014, 6:43 p.m., Miquel Sabaté Solà wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/117634/
> -----------------------------------------------------------
>
> (Updated April 18, 2014, 6:43 p.m.)
>
>
> Review request for Kate, Michal Humpula and Simon St James.
>
>
> Repository: ktexteditor
>
>
> Description
> -------
>
> As promised in a previous review request, I've implemented the Ctrl-u and Ctrl-w \
> commands in replace mode.
>
> Diffs
> -----
>
> autotests/src/vimode/modes.cpp 8d493ff
> src/vimode/katevireplacemode.h 9295cb8
> src/vimode/katevireplacemode.cpp b6dce40
>
> Diff: https://git.reviewboard.kde.org/r/117634/diff/
>
>
> Testing
> -------
>
> All tests are passing. Some additional tests have been provided.
>
>
> 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/117634/">https://git.reviewboard.kde.org/r/117634/</a>
</td>
</tr>
</table>
<br />
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;"> <p style="margin-top: 0;">On April 18th, 2014, 5:59 p.m. UTC, <b>Michal \
Humpula</b> wrote:</p> <blockquote style="margin-left: 1em; border-left: 2px solid \
#d0d0d0; padding-left: 10px;">
<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/117634/diff/1/?file=266940#file266940line111" \
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 style="background-color: #e4d9cb; padding: 4px 8px; text-align: center;">
<tr>
<td colspan="4"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">bool \
KateViReplaceMode::handleKeypress(const QKeyEvent *e)</pre></td>
</tr>
</tbody>
<tbody>
<tr>
<th bgcolor="#e9eaa8" style="border-right: 1px solid #C0C0C0;" \
align="right"><font size="2">111</font></th> <td bgcolor="#fdfebc" width="50%"><pre \
style="font-size: 8pt; line-height: 140%; margin: 0; "> <span \
class="n">startNormalMode</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">111</font></th> <td bgcolor="#fdfebc" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> \
<span class="hl"> </span><span class="k"><span class="hl">return</span></span> <span \
class="nf">startNormalMode</span><span class="p">();</span></pre></td> </tr>
</tbody>
</table>
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">same goes for every \
adjusted return statement in this function:
The handleKeypress uses return value for singnaling whether this key was handled or \
should be passed to regular key processing (might trigger the shortcut at the end). \
Functions like startNormalMode use booleas to signal, whether they were successfull \
(let's forget for a moment that most of them return true always). Are you sure, \
that you want to put "==" between those two meanings? In other words, does \
unsuccesfull return from startNormalMode means that we are not handling this key \
press altough we might have already altered the internal state somehow?</pre> \
</blockquote>
</blockquote>
<pre style="margin-left: 1em; white-space: pre-wrap; white-space: -moz-pre-wrap; \
white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">You're \
right. Even if these two meanings are bools, conceptually they are different and I \
shouldn't be mixing them. Fixed! :)</pre> <br />
<p>- Miquel</p>
<br />
<p>On April 18th, 2014, 6:43 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 18, 2014, 6:43 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;">As promised in a previous review request, I've implemented the \
Ctrl-u and Ctrl-w commands in replace mode.</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. Some additional tests have been provided.</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>autotests/src/vimode/modes.cpp <span style="color: grey">(8d493ff)</span></li>
<li>src/vimode/katevireplacemode.h <span style="color: grey">(9295cb8)</span></li>
<li>src/vimode/katevireplacemode.cpp <span style="color: grey">(b6dce40)</span></li>
</ul>
<p><a href="https://git.reviewboard.kde.org/r/117634/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