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

List:       kde-panel-devel
Subject:    Re: Review Request: kickoff: save recent applications list on every change to it
From:       "Aaron J. Seigo" <aseigo () kde ! org>
Date:       2012-05-31 10:09:02
Message-ID: 20120531100902.18671.72994 () 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/105112/#review14293
-----------------------------------------------------------


the real fubar here is that it stores this information internally in its own config \
file. this really ought to be stored/retrieved from nepomuk and/or zeitgeist.

i've cc'd Trever on this because he may have something to say about that as well.


plasma/desktop/applets/kickoff/core/recentapplications.cpp
<http://git.reviewboard.kde.org/r/105112/#comment11307>

    holding on to groups like this is a bit dangerous; you need to be able to know \
that the kconfig object behind it is always valid at all times. better to just create \
the group when needed.  
    a method that returns such a group on demand lets the code be shared, avoiding \
duplication of magic strings. e.g.:  
    KConfigGroup config()
    {
        return componentData().config()->group("RecentlyUsed");
    }



plasma/desktop/applets/kickoff/core/recentapplications.cpp
<http://git.reviewboard.kde.org/r/105112/#comment11308>

    it pains me to see such calls in paths which could be called quite often. yes, in \
theory should only happen when apps launch, but there is no guarantee that this will \
remain that way or that such events will not happen in rapid bursts.


- Aaron J. Seigo


On May 31, 2012, 10:08 a.m., Andriy Gapon wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/105112/
> -----------------------------------------------------------
> 
> (Updated May 31, 2012, 10:08 a.m.)
> 
> 
> Review request for Plasma and Trever Fischer.
> 
> 
> Description
> -------
> 
> Currently recent applications list in kickoff is saved only when kickoff gracefully \
> exits.  This could be a minor annoyance when X/KDE/plasma crashes.  I think that \
> saving the list on every update to it should be a good idea.  It should be a low \
> overhead too, because the list changes only when a user launches an application via \
> KDE. 
> 
> This addresses bug 206511.
> http://bugs.kde.org/show_bug.cgi?id=206511
> 
> 
> Diffs
> -----
> 
> plasma/desktop/applets/kickoff/core/recentapplications.cpp 3e05389 
> 
> Diff: http://git.reviewboard.kde.org/r/105112/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Andriy Gapon
> 
> 


[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/105112/">http://git.reviewboard.kde.org/r/105112/</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;">the real fubar here is \
that it stores this information internally in its own config file. this really ought \
to be stored/retrieved from nepomuk and/or zeitgeist.

i&#39;ve cc&#39;d Trever on this because he may have something to say about that as \
well.</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="http://git.reviewboard.kde.org/r/105112/diff/1/?file=65943#file65943line42" \
style="color: black; font-weight: bold; text-decoration: \
underline;">plasma/desktop/applets/kickoff/core/recentapplications.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; ">using \
namespace Kickoff;</pre></td>

  </tr>
 </tbody>



 
 




 <tbody>

  <tr>
    <th bgcolor="#e9eaa8" style="border-right: 1px solid #C0C0C0;" \
align="right"><font size="2">42</font></th>  <td bgcolor="#fdfebc" width="50%"><pre \
style="font-size: 8pt; line-height: 140%; margin: 0; ">       <span class="hl"> \
</span><span class="n"><span class="hl">KConfigGroup</span></span> <span \
class="n">recentGroup</span> <span class="o">=</span> <span \
class="n">componentData</span><span class="p">().</span><span \
class="n">config</span><span class="p">()</span><span class="o">-&gt;</span><span \
class="n">group</span><span class="p">(</span><span \
class="s">&quot;RecentlyUsed&quot;</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">42</font></th>  <td bgcolor="#fdfebc" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">        <span \
class="n">recentGroup</span> <span class="o">=</span> <span \
class="n">componentData</span><span class="p">().</span><span \
class="n">config</span><span class="p">()</span><span class="o">-&gt;</span><span \
class="n">group</span><span class="p">(</span><span \
class="s">&quot;RecentlyUsed&quot;</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;">holding on \
to groups like this is a bit dangerous; you need to be able to know that the kconfig \
object behind it is always valid at all times. better to just create the group when \
needed.

a method that returns such a group on demand lets the code be shared, avoiding \
duplication of magic strings. e.g.:

KConfigGroup config()
{
    return componentData().config()-&gt;group(&quot;RecentlyUsed&quot;);
}</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="http://git.reviewboard.kde.org/r/105112/diff/1/?file=65943#file65943line77" \
style="color: black; font-weight: bold; text-decoration: \
underline;">plasma/desktop/applets/kickoff/core/recentapplications.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; \
">public:</pre></td>

  </tr>
 </tbody>






 
 

 <tbody>

  <tr>
    <th bgcolor="#f0f0f0" style="border-right: 1px solid #C0C0C0;" \
align="right"><font size="2">76</font></th>  <td bgcolor="#ffffff" width="50%"><pre \
style="font-size: 8pt; line-height: 140%; margin: 0; ">        <span \
class="n">recentGroup</span><span class="p">.</span><span \
class="n">config</span><span class="p">()</span><span class="o">-&gt;</span><span \
class="n">sync</span><span class="p">();</span></pre></td>  <th bgcolor="#f0f0f0" \
style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" \
align="right"><font size="2">77</font></th>  <td bgcolor="#ffffff" width="50%"><pre \
style="font-size: 8pt; line-height: 140%; margin: 0; ">        <span \
class="n">recentGroup</span><span class="p">.</span><span \
class="n">config</span><span class="p">()</span><span class="o">-&gt;</span><span \
class="n">sync</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;">it pains me \
to see such calls in paths which could be called quite often. yes, in theory should \
only happen when apps launch, but there is no guarantee that this will remain that \
way or that such events will not happen in rapid bursts.</pre> </div>
<br />



<p>- Aaron J.</p>


<br />
<p>On May 31st, 2012, 10:08 a.m., Andriy Gapon wrote:</p>






<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" \
style="background-image: \
url('http://git.reviewboard.kde.org/media/rb/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 and Trever Fischer.</div>
<div>By Andriy Gapon.</div>


<p style="color: grey;"><i>Updated May 31, 2012, 10:08 a.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;">Currently recent applications list in kickoff is saved only when kickoff \
gracefully exits.  This could be a minor annoyance when X/KDE/plasma crashes.  I \
think that saving the list on every update to it should be a good idea.  It should be \
a low overhead too, because the list changes only when a user launches an application \
via KDE.</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=206511">206511</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>plasma/desktop/applets/kickoff/core/recentapplications.cpp <span style="color: \
grey">(3e05389)</span></li>

</ul>

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




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








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



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


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

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