[prev in list] [next in list] [prev in thread] [next in thread]
List: kfm-devel
Subject: Re: Review Request 112980: Fix Bug 267171 - Version state in details-view with expandable folders no
From: "Emmanuel Pescosta" <emmanuelpescosta099 () gmail ! com>
Date: 2013-09-29 14:30:11
Message-ID: 20130929143011.4467.99318 () vidsolbach ! de
[Download RAW message or body]
> On Sept. 29, 2013, 1:35 p.m., Frank Reininghaus wrote:
> > Thanks, very nice patch! Works nicely for me :-)
> >
> > The only minor thing that I noticed when I went through the code is that it might \
> > not be obvious what the return value of the function
> > int createItemStatesList(QMap<QString, QVector<ItemState> >& itemStates,
> > const int firstIndex = 0,
> > const int currentExpansionLevel = 0);
> >
> > is, and what its parameters mean.
> >
> > Moreover, the parameter "currentExpansionLevel" seems redundant to me because \
> > it's always equal to m_model->expandedParentsCount(firstIndex), right? One could \
> > calculate it inside the function by adding
> > const int currentExpansionLevel = m_model->expandedParentsCount(firstIndex);
> >
> > inside the function. It means that expandedParentsCount(int) will be called once \
> > more for that index, but it makes the header file easier to read, which I find \
> > slightly preferable. It's probably a matter of taste though, so feel free to \
> > decide yourself what you think is better.
> > But a comment in the header file that says what the function does, and that its \
> > return value is the number of items that have been processed won't hurt. What do \
> > you think?
> >
> >
Thanks for your feedback :)
> Moreover, the parameter "currentExpansionLevel" seems redundant to me because it's \
> always equal to m_model->expandedParentsCount(firstIndex), right?
Yes you are right, great idea - thanks for the hint!
> What do you think?
Comments are always good, I'll add it ;)
- Emmanuel
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/112980/#review40991
-----------------------------------------------------------
On Sept. 28, 2013, 7:38 p.m., Emmanuel Pescosta wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/112980/
> -----------------------------------------------------------
>
> (Updated Sept. 28, 2013, 7:38 p.m.)
>
>
> Review request for Dolphin.
>
>
> Description
> -------
>
> Show the right version states for expanded items.
>
>
> This addresses bug 267171.
> http://bugs.kde.org/show_bug.cgi?id=267171
>
>
> Diffs
> -----
>
> dolphin/src/views/versioncontrol/updateitemstatesthread.h a281697
> dolphin/src/views/versioncontrol/updateitemstatesthread.cpp fa005f8
> dolphin/src/views/versioncontrol/versioncontrolobserver.h 501af7d
> dolphin/src/views/versioncontrol/versioncontrolobserver.cpp 402a2de
>
> Diff: http://git.reviewboard.kde.org/r/112980/diff/
>
>
> Testing
> -------
>
> Works
>
>
> Thanks,
>
> Emmanuel Pescosta
>
>
[Attachment #3 (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/112980/">http://git.reviewboard.kde.org/r/112980/</a>
</td>
</tr>
</table>
<br />
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;"> <p style="margin-top: 0;">On September 29th, 2013, 1:35 p.m. UTC, <b>Frank \
Reininghaus</b> wrote:</p> <blockquote style="margin-left: 1em; border-left: 2px \
solid #d0d0d0; padding-left: 10px;"> <pre style="white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">Thanks, very nice patch! Works nicely for me :-)
The only minor thing that I noticed when I went through the code is that it might not \
be obvious what the return value of the function
int createItemStatesList(QMap<QString, QVector<ItemState> >& \
itemStates, const int firstIndex = 0,
const int currentExpansionLevel = 0);
is, and what its parameters mean.
Moreover, the parameter "currentExpansionLevel" seems redundant to me \
because it's always equal to m_model->expandedParentsCount(firstIndex), right? \
One could calculate it inside the function by adding
const int currentExpansionLevel = m_model->expandedParentsCount(firstIndex);
inside the function. It means that expandedParentsCount(int) will be called once more \
for that index, but it makes the header file easier to read, which I find slightly \
preferable. It's probably a matter of taste though, so feel free to decide \
yourself what you think is better.
But a comment in the header file that says what the function does, and that its \
return value is the number of items that have been processed won't hurt. What do \
you think?
</pre>
</blockquote>
</blockquote>
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Thanks for your feedback \
:)
> Moreover, the parameter "currentExpansionLevel" seems redundant to me \
because it's always equal to m_model->expandedParentsCount(firstIndex), right? \
Yes you are right, great idea - thanks for the hint!
> What do you think?
Comments are always good, I'll add it ;)</pre>
<br />
<p>- Emmanuel</p>
<br />
<p>On September 28th, 2013, 7:38 p.m. UTC, Emmanuel Pescosta wrote:</p>
<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 Dolphin.</div>
<div>By Emmanuel Pescosta.</div>
<p style="color: grey;"><i>Updated Sept. 28, 2013, 7:38 p.m.</i></p>
<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;">Show the right version states for expanded items. </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;">Works</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=267171">267171</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>dolphin/src/views/versioncontrol/updateitemstatesthread.h <span style="color: \
grey">(a281697)</span></li>
<li>dolphin/src/views/versioncontrol/updateitemstatesthread.cpp <span style="color: \
grey">(fa005f8)</span></li>
<li>dolphin/src/views/versioncontrol/versioncontrolobserver.h <span style="color: \
grey">(501af7d)</span></li>
<li>dolphin/src/views/versioncontrol/versioncontrolobserver.cpp <span style="color: \
grey">(402a2de)</span></li>
</ul>
<p><a href="http://git.reviewboard.kde.org/r/112980/diff/" style="margin-left: \
3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic