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

List:       kde-frameworks-devel
Subject:    Re: Review Request 121118: KEmoticons: Add a KEmoticonsIntegrationPlugin for KTextToHTML from KCoreA
From:       "David Faure" <faure () kde ! org>
Date:       2014-11-23 16:34:23
Message-ID: 20141123163423.11306.47532 () probe ! kde ! org
[Download RAW message or body]

--===============8856962949969332690==
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/121118/#review70817
-----------------------------------------------------------



autotests/CMakeLists.txt
<https://git.reviewboard.kde.org/r/121118/#comment49527>

    you changed the way the macro works, I suggest changing the name accordingly: \
kemoticons_unit_test, for instance.  
    This will leave room for a several-programs macro one day if needed.



autotests/ktexttohtmlplugintest.cpp
<https://git.reviewboard.kde.org/r/121118/#comment49528>

    Common mistake: this includes all of the QtTest framework *and* all of the QtCore \
framework.  
    You probably want <QTest> instead.



autotests/ktexttohtmlplugintest.cpp
<https://git.reviewboard.kde.org/r/121118/#comment49530>

    s/Q_ASSERT/QVERIFY/



autotests/ktexttohtmlplugintest.cpp
<https://git.reviewboard.kde.org/r/121118/#comment49529>

    should be const



src/integrationplugin/ktexttohtml.cpp
<https://git.reviewboard.kde.org/r/121118/#comment49532>

    Can this change at runtime? The cache would break that.
    (but see below)



src/integrationplugin/ktexttohtml.cpp
<https://git.reviewboard.kde.org/r/121118/#comment49534>

    It looks like emoticons.theme() would do the same, without the caching problem.


- David Faure


On Nov. 14, 2014, 12:36 p.m., Daniel Vrátil wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/121118/
> -----------------------------------------------------------
> 
> (Updated Nov. 14, 2014, 12:36 p.m.)
> 
> 
> Review request for KDE Frameworks, Albert Astals Cid and David Faure.
> 
> 
> Repository: kemoticons
> 
> 
> Description
> -------
> 
> This patch is related to /r/121094, which moves KTextToHTML conversion utility from \
> KPimUtils to KCoreAddons. Since KCoreAddons can't depend on KEmoticons needed for \
> smileys conversion, I created a plugin in KEmoticons that implements the interface \
> from KCoreAddons. This is based on the FrameworkIntegrationPlugin. 
> 
> Diffs
> -----
> 
> CMakeLists.txt 1550bfe 
> autotests/CMakeLists.txt 29b7eb6 
> autotests/ktexttohtmlplugintest.cpp PRE-CREATION 
> src/CMakeLists.txt 7b10087 
> src/integrationplugin/CMakeLists.txt PRE-CREATION 
> src/integrationplugin/kemoticonsintegrationplugin.h PRE-CREATION 
> src/integrationplugin/kemoticonsintegrationplugin.cpp PRE-CREATION 
> src/integrationplugin/ktexttohtml.h PRE-CREATION 
> src/integrationplugin/ktexttohtml.cpp PRE-CREATION 
> 
> Diff: https://git.reviewboard.kde.org/r/121118/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Daniel Vrátil
> 
> 


--===============8856962949969332690==
MIME-Version: 1.0
Content-Type: text/html; charset="utf-8"
Content-Transfer-Encoding: 8bit




<html>
 <body>
  <div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
   <table bgcolor="#f9f3c9" width="100%" cellpadding="12" style="border: 1px #c9c399 \
solid; border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;">  \
<tr>  <td>
      This is an automatically generated e-mail. To reply, visit:
      <a href="https://git.reviewboard.kde.org/r/121118/">https://git.reviewboard.kde.org/r/121118/</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="https://git.reviewboard.kde.org/r/121118/diff/1/?file=328405#file328405line4" \
style="color: black; font-weight: bold; text-decoration: \
underline;">autotests/CMakeLists.txt</a>  <span style="font-weight: normal;">

     (Diff revision 1)

    </span>
   </th>
  </tr>
 </thead>



 
 

 <tbody>

  <tr>
    <th bgcolor="#f0f0f0" style="border-right: 1px solid #C0C0C0;" \
align="right"><font size="2">4</font></th>  <td bgcolor="#ffffff" width="50%"><pre \
style="font-size: 8pt; line-height: 140%; margin: 0; "><span \
class="nb">macro</span><span class="p">(</span><span \
class="s">kemoticons_unit_tests</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">4</font></th>  <td bgcolor="#ffffff" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span \
class="nb">macro</span><span class="p">(</span><span \
class="s">kemoticons_unit_tests</span><span class="p">)</span></pre></td>  </tr>

 </tbody>

</table>

 <div style="margin-left: 2em;">

  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: \
0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">you \
changed the way the macro works, I suggest changing the name accordingly: \
kemoticons_unit_test, for instance.</p> <p style="padding: 0;text-rendering: \
inherit;margin: 0;line-height: inherit;white-space: inherit;">This will leave room \
for a several-programs macro one day if needed.</p></pre>  </div>
</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="https://git.reviewboard.kde.org/r/121118/diff/1/?file=328406#file328406line21" \
style="color: black; font-weight: bold; text-decoration: \
underline;">autotests/ktexttohtmlplugintest.cpp</a>  <span style="font-weight: \
normal;">

     (Diff revision 1)

    </span>
   </th>
  </tr>
 </thead>



 
 

 <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">21</font></th>  <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span \
class="cp">#include &lt;QtTest&gt;</span></pre></td>  </tr>

 </tbody>

</table>

 <div style="margin-left: 2em;">

  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: \
0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: \
inherit;">Common mistake: this includes all of the QtTest framework <em \
style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: \
normal;">and</em> all of the QtCore framework.</p> <p style="padding: \
0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">You \
probably want &lt;QTest&gt; instead.</p></pre>  </div>
</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="https://git.reviewboard.kde.org/r/121118/diff/1/?file=328406#file328406line48" \
style="color: black; font-weight: bold; text-decoration: \
underline;">autotests/ktexttohtmlplugintest.cpp</a>  <span style="font-weight: \
normal;">

     (Diff revision 1)

    </span>
   </th>
  </tr>
 </thead>



 
 

 <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">48</font></th>  <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span \
class="n">Q_ASSERT</span><span class="p">(</span><span class="o">!</span><span \
class="n">mEmoticonsThemePath</span><span class="p">.</span><span \
class="n">isEmpty</span><span class="p">());</span></pre></td>  </tr>

 </tbody>

</table>

 <div style="margin-left: 2em;">

  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: \
0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: \
inherit;">s/Q_ASSERT/QVERIFY/</p></pre>  </div>
</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="https://git.reviewboard.kde.org/r/121118/diff/1/?file=328406#file328406line51" \
style="color: black; font-weight: bold; text-decoration: \
underline;">autotests/ktexttohtmlplugintest.cpp</a>  <span style="font-weight: \
normal;">

     (Diff revision 1)

    </span>
   </th>
  </tr>
 </thead>



 
 

 <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">51</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">KTextToHTMLPluginTest</span><span \
class="o">::</span><span class="n">htmlForSmiley</span><span class="p">(</span><span \
class="k">const</span> <span class="n">QString</span> <span \
class="o">&amp;</span><span class="n">emoticon</span><span class="p">,</span> <span \
class="k">const</span> <span class="n">QString</span> <span \
class="o">&amp;</span><span class="n">name</span><span class="p">)</span></pre></td>  \
</tr>

 </tbody>

</table>

 <div style="margin-left: 2em;">

  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: \
0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: \
inherit;">should be const</p></pre>  </div>
</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="https://git.reviewboard.kde.org/r/121118/diff/1/?file=328412#file328412line36" \
style="color: black; font-weight: bold; text-decoration: \
underline;">src/integrationplugin/ktexttohtml.cpp</a>  <span style="font-weight: \
normal;">

     (Diff revision 1)

    </span>
   </th>
  </tr>
 </thead>



 
 

 <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">36</font></th>  <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">        <span \
class="n">s_cachedCurrentTheme</span> <span class="o">=</span> <span \
class="n">KEmoticons</span><span class="o">::</span><span \
class="n">currentThemeName</span><span class="p">();</span></pre></td>  </tr>

 </tbody>

</table>

 <div style="margin-left: 2em;">

  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: \
0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Can \
this change at runtime? The cache would break that. (but see below)</p></pre>
 </div>
</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="https://git.reviewboard.kde.org/r/121118/diff/1/?file=328412#file328412line39" \
style="color: black; font-weight: bold; text-decoration: \
underline;">src/integrationplugin/ktexttohtml.cpp</a>  <span style="font-weight: \
normal;">

     (Diff revision 1)

    </span>
   </th>
  </tr>
 </thead>



 
 

 <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">39</font></th>  <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span \
class="n">KEmoticonsTheme</span> <span class="n">theme</span> <span \
class="o">=</span> <span class="n">emoticons</span><span class="p">.</span><span \
class="n">theme</span><span class="p">(</span><span \
class="n">s_cachedCurrentTheme</span><span class="p">);</span></pre></td>  </tr>

 </tbody>

</table>

 <div style="margin-left: 2em;">

  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: \
0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">It \
looks like emoticons.theme() would do the same, without the caching \
problem.</p></pre>  </div>
</div>
<br />



<p>- David Faure</p>


<br />
<p>On November 14th, 2014, 12:36 p.m. UTC, Daniel Vrátil wrote:</p>









<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="12" style="border: \
1px #888a85 solid; border-radius: 6px; -moz-border-radius: 6px; \
-webkit-border-radius: 6px;">  <tr>
  <td>

<div>Review request for KDE Frameworks, Albert Astals Cid and David Faure.</div>
<div>By Daniel Vrátil.</div>


<p style="color: grey;"><i>Updated Nov. 14, 2014, 12:36 p.m.</i></p>









<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt;">Repository: </b>
kemoticons
</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;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">This patch is related to /r/121094, which moves \
KTextToHTML conversion utility from KPimUtils to KCoreAddons. Since KCoreAddons can't \
depend on KEmoticons needed for smileys conversion, I created a plugin in KEmoticons \
that implements the interface from KCoreAddons. This is based on the \
FrameworkIntegrationPlugin.</p></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>CMakeLists.txt <span style="color: grey">(1550bfe)</span></li>

 <li>autotests/CMakeLists.txt <span style="color: grey">(29b7eb6)</span></li>

 <li>autotests/ktexttohtmlplugintest.cpp <span style="color: \
grey">(PRE-CREATION)</span></li>

 <li>src/CMakeLists.txt <span style="color: grey">(7b10087)</span></li>

 <li>src/integrationplugin/CMakeLists.txt <span style="color: \
grey">(PRE-CREATION)</span></li>

 <li>src/integrationplugin/kemoticonsintegrationplugin.h <span style="color: \
grey">(PRE-CREATION)</span></li>

 <li>src/integrationplugin/kemoticonsintegrationplugin.cpp <span style="color: \
grey">(PRE-CREATION)</span></li>

 <li>src/integrationplugin/ktexttohtml.h <span style="color: \
grey">(PRE-CREATION)</span></li>

 <li>src/integrationplugin/ktexttohtml.cpp <span style="color: \
grey">(PRE-CREATION)</span></li>

</ul>

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






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








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


--===============8856962949969332690==--



_______________________________________________
Kde-frameworks-devel mailing list
Kde-frameworks-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-frameworks-devel


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

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