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

List:       kde-panel-devel
Subject:    Re: Review Request: Clean up rtm headers and move private data from Auth and
From:       "Andrew Stromme" <astromme () chatonka ! com>
Date:       2012-08-02 18:27:50
Message-ID: 20120802182750.17831.70140 () 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/105734/#review16799
-----------------------------------------------------------


This looks like a straightforward port of the login authorization from libr=
tm to the applet, and I agree with the design choices and new locations.


libs/rtm/auth.cpp
<http://git.reviewboard.kde.org/r/105734/#comment13091>

    The frob could be empty for two reasons:
    =

       1. It wasn't requested
       2. There was some error in the request
    =

    Because you call getAuthUrl() when the frob comes in I don't think it w=
ill ever be the situation that the frob is on its way but isn't there yet. =
I think in the case when there is no frob it might be best to return a Null=
 QString() to indicate the error condition.



applets/rememberthemilk/rememberthemilk-plasmoid.cpp
<http://git.reviewboard.kde.org/r/105734/#comment13092>

    I think there might be some faulty logic with regards to the busy spinn=
er (and it very well might have been my fault). I notice that when I start =
the widget (unauthenticated) and authenticate for the first time the "Apply=
" button becomes active after the authentication is successful. If I press =
Ok or Apply the busy spinner starts and never stops (presumably because we =
are trying to re-auth and the first tasks never refresh because they're alr=
eady there). However, if I press cancel everything works fine (because it d=
idn't try and re-authenticate with the saved key). You might want to explor=
e this a bit.


- Andrew Stromme


On Aug. 1, 2012, 2:45 p.m., Jeremy Paul Whiting wrote:
> =

> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/105734/
> -----------------------------------------------------------
> =

> (Updated Aug. 1, 2012, 2:45 p.m.)
> =

> =

> Review request for Plasma and Andrew Stromme.
> =

> =

> Description
> -------
> =

> rtm: Move Request private data into RequestPrivate class in .cpp file. rt=
m: Move Auth private data into AuthPrivate class in .cpp file. rtm: Clean u=
p auth.h and request.h files.
> =

> =

> rtm: Clean up rtm header files.
> =

> =

> Add #include <rtm/task.h> since we use Task * (and session.h has been cle=
aned up).
> =

> =

> Diffs
> -----
> =

>   applets/rememberthemilk/CMakeLists.txt 18424ead610b78710fa896a4ea3986fc=
d7e2f364 =

>   applets/rememberthemilk/authenticate.ui cf7b9330d6d8f834225878f24eeb9be=
90651dbef =

>   applets/rememberthemilk/rememberthemilk-plasmoid.h cf02fbad4ab3e46d051d=
26b2de55c2ff01fb00b8 =

>   applets/rememberthemilk/rememberthemilk-plasmoid.cpp 3413e59c69c079480e=
fb2ba37e63927ad45df56e =

>   dataengines/rememberthemilk/authservice.h 31f44284422ea4ffdcc7631b5b321=
a1785480cdb =

>   dataengines/rememberthemilk/authservice.cpp c75e6cb6414920871358982aa22=
6b3cbab1ca02f =

>   dataengines/rememberthemilk/rtmauth.operations 155a8ae6bdfde4d4fa1056ba=
0cc750ea6b9214e1 =

>   dataengines/rememberthemilk/taskservice.cpp d738093ffd7c5183cf24f9f932d=
0c7f934b6634b =

>   libs/rtm/CMakeLists.txt 58ab4939812bbce07068a6da8c1a1194f6377595 =

>   libs/rtm/auth.h 5f693fa53fc273e2a3782ac57e8c1ca3f8b194a1 =

>   libs/rtm/auth.cpp 16fd5f0c28004dcc12140556e8d6727c483c2ed9 =

>   libs/rtm/note.h af4cfd20c6ddaf1a4943f76f148c79918b5ec633 =

>   libs/rtm/request.h d371714c144bf9bc6c7304a861840334f0846cdb =

>   libs/rtm/request.cpp 1304cb5d1a547d08b7f82e44cd319097991c8425 =

>   libs/rtm/rtm.h 1a542f6007c63df13b79dd60da0cfcfe294f8e16 =

>   libs/rtm/session.h aad145c44c70fb28fe1496b93d991667e918f630 =

>   libs/rtm/session.cpp 051838f58c8f7a6b6aea9511f1d455197fafb08b =

>   libs/rtm/xmlreaders.h b9ea78ca567e32aceb70361a2735b7b005d15777 =

> =

> Diff: http://git.reviewboard.kde.org/r/105734/diff/
> =

> =

> Testing
> -------
> =

> It builds and runs ok here (the rtm applet logs in and loads data ok).
> =

> =

> Thanks,
> =

> Jeremy Paul Whiting
> =

>


[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/105734/">http://git.reviewboard.kde.org/r/105734/</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;">This looks like a \
straightforward port of the login authorization from librtm to the applet, and I \
agree with the design choices and new locations.</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/105734/diff/1-2/?file=74815#file74815line124" \
style="color: black; font-weight: bold; text-decoration: \
underline;">libs/rtm/auth.cpp</a>  <span style="font-weight: normal;">

     (Diff revisions 1 - 2)

    </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; ">class \
RTM::AuthPrivate {</pre></td>

  </tr>
 </tbody>



 
 




 <tbody>

  <tr>
    <th bgcolor="#e9eaa8" style="border-right: 1px solid #C0C0C0;" \
align="right"><font size="2">120</font></th>  <td bgcolor="#fdfebc" width="50%"><pre \
style="font-size: 8pt; line-height: 140%; margin: 0; ">  <span class="k">if</span> \
<span class="p">(</span><span class="n">d</span><span class="o">-&gt;</span><span \
class="n">frob</span><span class="p">.</span><span class="n">isEmpty</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">81</font></th>  <td bgcolor="#fdfebc" width="50%"><pre style="font-size: \
8pt; line-height: 140%; margin: 0; ">  <span class="c1">// </span><span \
class="cs">TODO</span><span class="c1">: don&#39;t return until we get a \
frob?</span></pre></td>  </tr>

  <tr>
    <th bgcolor="#e9eaa8" style="border-right: 1px solid #C0C0C0;" \
align="right"><font size="2">121</font></th>  <td bgcolor="#fdfebc" width="50%"><pre \
style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span \
class="n">kWarning</span><span class="p">()</span> <span class="o">&lt;&lt;</span> \
<span class="s">&quot;Warning, Frob is EMPTY&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">82</font></th>  <td bgcolor="#fdfebc" width="50%"><pre style="font-size: \
8pt; line-height: 140%; margin: 0; ">  <span class="k">while</span> <span \
class="p">(</span><span class="n">d</span><span class="o">-&gt;</span><span \
class="n">frob</span><span class="p">.</span><span class="n">isEmpty</span><span \
class="p">())</span></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">83</font></th>  <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span \
class="n">QCoreApplication</span><span class="o">::</span><span \
class="n">processEvents</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 frob \
could be empty for two reasons:

   1. It wasn&#39;t requested
   2. There was some error in the request

Because you call getAuthUrl() when the frob comes in I don&#39;t think it will ever \
be the situation that the frob is on its way but isn&#39;t there yet. I think in the \
case when there is no frob it might be best to return a Null QString() to indicate \
the error condition.</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/105734/diff/2/?file=75481#file75481line116" \
style="color: black; font-weight: bold; text-decoration: \
underline;">applets/rememberthemilk/rememberthemilk-plasmoid.cpp</a>  <span \
style="font-weight: normal;">

     (Diff revision 2)

    </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 \
RememberTheMilkPlasmoid::init() {</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">116</font></th>  <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">  <span \
class="n">busyUntil</span><span class="p">(</span><span class="n">authJob</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">117</font></th>  <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">  <span \
class="n">busyUntil</span><span class="p">(</span><span class="mi">0</span><span \
class="p">);</span> <span class="c1">// Sets busy until we manually call \
jobFinished(0). Busy until first tasks refresh</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;">I think \
there might be some faulty logic with regards to the busy spinner (and it very well \
might have been my fault). I notice that when I start the widget (unauthenticated) \
and authenticate for the first time the &quot;Apply&quot; button becomes active after \
the authentication is successful. If I press Ok or Apply the busy spinner starts and \
never stops (presumably because we are trying to re-auth and the first tasks never \
refresh because they&#39;re already there). However, if I press cancel everything \
works fine (because it didn&#39;t try and re-authenticate with the saved key). You \
might want to explore this a bit.</pre> </div>
<br />



<p>- Andrew</p>


<br />
<p>On August 1st, 2012, 2:45 p.m., Jeremy Paul Whiting 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 Andrew Stromme.</div>
<div>By Jeremy Paul Whiting.</div>


<p style="color: grey;"><i>Updated Aug. 1, 2012, 2:45 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;">rtm: Move Request private data into RequestPrivate class in .cpp file. \
rtm: Move Auth private data into AuthPrivate class in .cpp file. rtm: Clean up auth.h \
and request.h files.


rtm: Clean up rtm header files.


Add #include &lt;rtm/task.h&gt; since we use Task * (and session.h has been cleaned \
up).</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;">It builds and runs ok here (the rtm applet logs in and loads data \
ok).</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>applets/rememberthemilk/CMakeLists.txt <span style="color: \
grey">(18424ead610b78710fa896a4ea3986fcd7e2f364)</span></li>

 <li>applets/rememberthemilk/authenticate.ui <span style="color: \
grey">(cf7b9330d6d8f834225878f24eeb9be90651dbef)</span></li>

 <li>applets/rememberthemilk/rememberthemilk-plasmoid.h <span style="color: \
grey">(cf02fbad4ab3e46d051d26b2de55c2ff01fb00b8)</span></li>

 <li>applets/rememberthemilk/rememberthemilk-plasmoid.cpp <span style="color: \
grey">(3413e59c69c079480efb2ba37e63927ad45df56e)</span></li>

 <li>dataengines/rememberthemilk/authservice.h <span style="color: \
grey">(31f44284422ea4ffdcc7631b5b321a1785480cdb)</span></li>

 <li>dataengines/rememberthemilk/authservice.cpp <span style="color: \
grey">(c75e6cb6414920871358982aa226b3cbab1ca02f)</span></li>

 <li>dataengines/rememberthemilk/rtmauth.operations <span style="color: \
grey">(155a8ae6bdfde4d4fa1056ba0cc750ea6b9214e1)</span></li>

 <li>dataengines/rememberthemilk/taskservice.cpp <span style="color: \
grey">(d738093ffd7c5183cf24f9f932d0c7f934b6634b)</span></li>

 <li>libs/rtm/CMakeLists.txt <span style="color: \
grey">(58ab4939812bbce07068a6da8c1a1194f6377595)</span></li>

 <li>libs/rtm/auth.h <span style="color: \
grey">(5f693fa53fc273e2a3782ac57e8c1ca3f8b194a1)</span></li>

 <li>libs/rtm/auth.cpp <span style="color: \
grey">(16fd5f0c28004dcc12140556e8d6727c483c2ed9)</span></li>

 <li>libs/rtm/note.h <span style="color: \
grey">(af4cfd20c6ddaf1a4943f76f148c79918b5ec633)</span></li>

 <li>libs/rtm/request.h <span style="color: \
grey">(d371714c144bf9bc6c7304a861840334f0846cdb)</span></li>

 <li>libs/rtm/request.cpp <span style="color: \
grey">(1304cb5d1a547d08b7f82e44cd319097991c8425)</span></li>

 <li>libs/rtm/rtm.h <span style="color: \
grey">(1a542f6007c63df13b79dd60da0cfcfe294f8e16)</span></li>

 <li>libs/rtm/session.h <span style="color: \
grey">(aad145c44c70fb28fe1496b93d991667e918f630)</span></li>

 <li>libs/rtm/session.cpp <span style="color: \
grey">(051838f58c8f7a6b6aea9511f1d455197fafb08b)</span></li>

 <li>libs/rtm/xmlreaders.h <span style="color: \
grey">(b9ea78ca567e32aceb70361a2735b7b005d15777)</span></li>

</ul>

<p><a href="http://git.reviewboard.kde.org/r/105734/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