<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://reviewboard.kde.org/r/4585/">http://reviewboard.kde.org/r/4585/</a>
</td>
</tr>
</table>
<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="/r/4585/diff/3/?file=30674#file30674line265" style="color: black; font-weight: bold; text-decoration: underline;">/trunk/KDE/kdebase/workspace/libs/taskmanager/taskgroup.cpp</a>
<span style="font-weight: normal;">
(Diff revision 3)
</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; ">void TaskGroup::remove(AbstractGroupableItem *item)</pre></td>
</tr>
</tbody>
<tbody>
<tr>
<th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
<th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">265</font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="n">LauncherItem</span> <span class="o">*</span><span class="n">item</span> <span class="o">=</span> <span class="n">qobject_cast</span><span class="o"><</span><span class="n">LauncherItem</span><span class="o">*></span><span class="p">(</span><span class="n">member</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 the item is guaranteed to be a LauncherItem, just use a static_cast (faster than a qobject_cast, and doesn't imply that it might be something else)</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="/r/4585/diff/4/?file=34268#file34268line43" style="color: black; font-weight: bold; text-decoration: underline;">/trunk/KDE/kdebase/workspace/libs/taskmanager/abstractgroupableitem.h</a>
<span style="font-weight: normal;">
(Diff revision 4)
</span>
</th>
</tr>
</thead>
<tbody style="background-color: #e4d9cb; padding: 4px 8px; text-align: center;">
<tr>
<td colspan="2"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
<td colspan="2"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">enum ItemType</pre></td>
</tr>
</tbody>
<tbody>
<tr>
<th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
<th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">43</font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="n">typeGroupItem</span><span class="p">,</span></pre></td>
</tr>
<tr>
<th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
<th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">44</font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="n">typeLauncherItem</span><span class="p">,</span></pre></td>
</tr>
<tr>
<th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
<th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">45</font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="n">typeTaskItem</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;">following the naming conventions:
GroupItemType,
LauncherItemType,
TaskItemType
</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="/r/4585/diff/4/?file=34274#file34274line326" style="color: black; font-weight: bold; text-decoration: underline;">/trunk/KDE/kdebase/workspace/libs/taskmanager/groupmanager.cpp</a>
<span style="font-weight: normal;">
(Diff revision 4)
</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; ">void GroupManagerPrivate::removeTask(TaskPtr task)</pre></td>
</tr>
</tbody>
<tbody>
<tr>
<th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
<th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">326</font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="n">QString</span> <span class="n">taskClass</span> <span class="o">=</span> <span class="n">task</span><span class="o">-></span><span class="n">classClass</span><span class="p">().</span><span class="n">toLower</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;">const QString</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="/r/4585/diff/4/?file=34274#file34274line328" style="color: black; font-weight: bold; text-decoration: underline;">/trunk/KDE/kdebase/workspace/libs/taskmanager/groupmanager.cpp</a>
<span style="font-weight: normal;">
(Diff revision 4)
</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; ">void GroupManagerPrivate::removeTask(TaskPtr task)</pre></td>
</tr>
</tbody>
<tbody>
<tr>
<th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
<th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">328</font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="k">if</span> <span class="p">(</span><span class="n">taskClass</span> <span class="o">==</span> <span class="n">launcher</span><span class="o">-></span><span class="n">name</span><span class="p">().</span><span class="n">toLower</span><span class="p">())</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;">probably a bit faster to do:
taskClass.compare(launcher->name(), Qt::CaseInsensitive) == 0
since that prevents a copy of the string being made. it would also make the above toLower() unnecessary.</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="/r/4585/diff/4/?file=34283#file34283line275" style="color: black; font-weight: bold; text-decoration: underline;">/trunk/KDE/kdebase/workspace/libs/taskmanager/taskgroup.cpp</a>
<span style="font-weight: normal;">
(Diff revision 4)
</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; ">void TaskGroup::remove(AbstractGroupableItem *item)</pre></td>
</tr>
</tbody>
<tbody>
<tr>
<th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
<th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">275</font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="n">LauncherItem</span> <span class="o">*</span><span class="n">item</span> <span class="o">=</span> <span class="n">qobject_cast</span><span class="o"><</span><span class="n">LauncherItem</span><span class="o">*></span><span class="p">(</span><span class="n">member</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;">the result of qobject_cast isn't checked and the item is guaranteed to be a launcher, so a static_cast is enough (and faster) here</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="/r/4585/diff/4/?file=34283#file34283line289" style="color: black; font-weight: bold; text-decoration: underline;">/trunk/KDE/kdebase/workspace/libs/taskmanager/taskgroup.cpp</a>
<span style="font-weight: normal;">
(Diff revision 4)
</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; ">void TaskGroup::remove(AbstractGroupableItem *item)</pre></td>
</tr>
</tbody>
<tbody>
<tr>
<th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
<th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">289</font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="n">LauncherItem</span> <span class="o">*</span><span class="n">launcher</span> <span class="o">=</span> <span class="n">qobject_cast</span><span class="o"><</span><span class="n">LauncherItem</span><span class="o">*></span><span class="p">(</span><span class="n">item</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;">the result of qobject_cast isn't checked and the item is guaranteed to be a launcher, so a static_cast is enough (and faster) here</pre>
</div>
<br />
<p>- Aaron</p>
<br />
<p>On August 22nd, 2010, 10:39 a.m., Anton Kreuzkamp wrote:</p>
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('http://reviewboard.kde.orgrb/images/review_request_box_top_bg.png'); background-position: left top; background-repeat: repeat-x; border: 1px black solid;">
<tr>
<td>
<div>Review request for Plasma.</div>
<div>By Anton Kreuzkamp.</div>
<p style="color: grey;"><i>Updated 2010-08-22 10:39:29</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;">Adds support for Windows 7 like launchers in libtaskmanager.
(I'm on holliday from 12th July until 1st August so I will not be able to reply during this time.)</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 with a small test-applett and everything works.</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>/trunk/KDE/kdebase/workspace/libs/taskmanager/CMakeLists.txt <span style="color: grey">(1148442)</span></li>
<li>/trunk/KDE/kdebase/workspace/libs/taskmanager/abstractgroupableitem.h <span style="color: grey">(1148442)</span></li>
<li>/trunk/KDE/kdebase/workspace/libs/taskmanager/abstractgroupableitem.cpp <span style="color: grey">(1148442)</span></li>
<li>/trunk/KDE/kdebase/workspace/libs/taskmanager/abstractgroupingstrategy.h <span style="color: grey">(1148442)</span></li>
<li>/trunk/KDE/kdebase/workspace/libs/taskmanager/abstractgroupingstrategy.cpp <span style="color: grey">(1148442)</span></li>
<li>/trunk/KDE/kdebase/workspace/libs/taskmanager/abstractsortingstrategy.cpp <span style="color: grey">(1148442)</span></li>
<li>/trunk/KDE/kdebase/workspace/libs/taskmanager/groupmanager.h <span style="color: grey">(1148442)</span></li>
<li>/trunk/KDE/kdebase/workspace/libs/taskmanager/groupmanager.cpp <span style="color: grey">(1148442)</span></li>
<li>/trunk/KDE/kdebase/workspace/libs/taskmanager/launcheritem.h <span style="color: grey">(PRE-CREATION)</span></li>
<li>/trunk/KDE/kdebase/workspace/libs/taskmanager/launcheritem.cpp <span style="color: grey">(PRE-CREATION)</span></li>
<li>/trunk/KDE/kdebase/workspace/libs/taskmanager/strategies/alphasortingstrategy.cpp <span style="color: grey">(1148442)</span></li>
<li>/trunk/KDE/kdebase/workspace/libs/taskmanager/strategies/kustodiangroupingstrategy.cpp <span style="color: grey">(1148442)</span></li>
<li>/trunk/KDE/kdebase/workspace/libs/taskmanager/strategies/manualgroupingstrategy.cpp <span style="color: grey">(1148442)</span></li>
<li>/trunk/KDE/kdebase/workspace/libs/taskmanager/strategies/programgroupingstrategy.cpp <span style="color: grey">(1148442)</span></li>
<li>/trunk/KDE/kdebase/workspace/libs/taskmanager/taskactions.cpp <span style="color: grey">(1148442)</span></li>
<li>/trunk/KDE/kdebase/workspace/libs/taskmanager/taskgroup.h <span style="color: grey">(1166310)</span></li>
<li>/trunk/KDE/kdebase/workspace/libs/taskmanager/taskgroup.cpp <span style="color: grey">(1166310)</span></li>
<li>/trunk/KDE/kdebase/workspace/libs/taskmanager/taskitem.h <span style="color: grey">(1166310)</span></li>
<li>/trunk/KDE/kdebase/workspace/libs/taskmanager/taskitem.cpp <span style="color: grey">(1148442)</span></li>
</ul>
<p><a href="http://reviewboard.kde.org/r/4585/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>