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

List:       kwrite-devel
Subject:    Re: Review Request 113720: Python plugins refactored
From:       "Dominik Haumann" <dhaumann () kde ! org>
Date:       2013-11-10 11:22:42
Message-ID: 20131110112242.8947.25950 () 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/113720/#review43330
-----------------------------------------------------------


All in all, I like the patch very much except some minor issues.

A question I have, though: If a plugin cannot be loaded for e.g. some missing \
dependencies, previously, this error was displayed in the list view. I assume the \
error is now not displayed anymore? Or do I miss something? :-) Feedback to the user \
at this point is very important, if need be as a message box or so.

I think a review from Shaheed is very important. Shaheed, do you support this change?


addons/kate/pate/src/CMakeLists.txt
<http://git.reviewboard.kde.org/r/113720/#comment31202>

    Should each plugin have an own CMakeLists.txt file, listing the install \
directives? Not a show-stopper, but still :)



addons/kate/pate/src/engine.h
<http://git.reviewboard.kde.org/r/113720/#comment31203>

    We are not using that at all in KDE, iirc. I'm not sure whether all compilers \
support that. So there is no need to change that now, especially since this has \
nothing to do with the patch itself...



addons/kate/pate/src/engine.h
<http://git.reviewboard.kde.org/r/113720/#comment31204>

    Since this is a public struct, we usually omit the m_ prefix in this case. And:
    - srv -> service
    - module_file -> moduleFile
    - error_reason -> errorReason



addons/kate/pate/src/engine.cpp
<http://git.reviewboard.kde.org/r/113720/#comment31217>

    Now that the Pate::Engine() has no parent, who deletes finally? Maybe I'm missing \
a delete call in the destructor of the Pate plugin or somehwere else?



addons/kate/pate/src/engine.cpp
<http://git.reviewboard.kde.org/r/113720/#comment31205>

    This is an override, and in the .h-file row and column are just int and not const \
int. I'd propose to use the exactly same signature.



addons/kate/pate/src/engine.cpp
<http://git.reviewboard.kde.org/r/113720/#comment31206>

    save here: remove const from const int role.



addons/kate/pate/src/engine.cpp
<http://git.reviewboard.kde.org/r/113720/#comment31207>

    same here.



addons/kate/pate/src/engine.cpp
<http://git.reviewboard.kde.org/r/113720/#comment31208>

    This is the major question of the patch: Is a distinction between 2 and 3 enough? \
Wasn't python 3.3 incompatible to e.g. 3.0?



addons/kate/pate/src/engine.cpp
<http://git.reviewboard.kde.org/r/113720/#comment31209>

    Since you cache the end iterator value:
    Is it possible to use a const_iterator here?



addons/kate/pate/src/manager.ui
<http://git.reviewboard.kde.org/r/113720/#comment31210>

    In another commit, you just removed these lines ;)



addons/kate/pate/src/plugin.cpp
<http://git.reviewboard.kde.org/r/113720/#comment31211>

    Picked an arbitrary line:
    
    Some prefer Type* variable; some Type *variable; some Type * variable;
    
    I'm not convinced that Type* variable; is so much better than Type *variable to \
justify moving the * :-)  
    Not really an issue, though.
    
    PS: I prefer Type * variable. This way, the '*' is best visible.



addons/kate/pate/src/plugin.cpp
<http://git.reviewboard.kde.org/r/113720/#comment31213>

    Please remove dead code, if not needed ;)


- Dominik Haumann


On Nov. 8, 2013, 6:09 a.m., Alex Turbov wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/113720/
> -----------------------------------------------------------
> 
> (Updated Nov. 8, 2013, 6:09 a.m.)
> 
> 
> Review request for Kate and Shaheed Haque.
> 
> 
> Repository: kate
> 
> 
> Description
> -------
> 
> Search installed Python plugins via trader. 
> Introduce `Kate/PythonPlugin` service type. 
> Make plugins management look-n-feel as C++ plugins.
> Enabled plugins now are per session (stored under "Enabled Plugins" key of the pate \
> config group), so it is possible to have different plugins in different sessions \
> (just like C++ plugins). 
> Sample .desktop file:
> 
> [Desktop Entry]
> Type=Service
> ServiceTypes=Kate/PythonPlugin
> X-KDE-Library=cmake_utils/cmake_utils.py
> Name=CMake Utilities
> Comment=Code completer, cache and help browser
> X-Python-2-Compatible=false
> X-Python-3-Compatible=true
> 
> The patch contains .desktop files only for plugins I wrote (and use) myself. Other \
> plugins still need .desktop files (I don't know exactly which Python they are \
> require) 
> 
> Diffs
> -----
> 
> addons/kate/pate/src/utilities.cpp 3ed19d6 
> addons/kate/pate/src/utilities.h d88af0f 
> addons/kate/pate/src/plugins/format.desktop PRE-CREATION 
> addons/kate/pate/src/plugins/expand.desktop PRE-CREATION 
> addons/kate/pate/src/plugins/commentar.desktop PRE-CREATION 
> addons/kate/pate/src/plugins/color_tools.desktop PRE-CREATION 
> addons/kate/pate/src/plugins/cmake_utils/cmake_utils.desktop PRE-CREATION 
> addons/kate/pate/src/plugins/block.desktop PRE-CREATION 
> addons/kate/pate/src/plugin.cpp 85c84a3 
> addons/kate/pate/src/plugin.h 77369c6 
> addons/kate/pate/src/manager.ui 82213ee 
> addons/kate/pate/src/katepythonplugin.desktop PRE-CREATION 
> addons/kate/pate/src/engine.cpp 5484473 
> addons/kate/pate/src/engine.h 6c70ab9 
> addons/kate/pate/src/CMakeLists.txt 78bbdc0 
> 
> Diff: http://git.reviewboard.kde.org/r/113720/diff/
> 
> 
> Testing
> -------
> 
> 
> File Attachments
> ----------------
> 
> Python Plugins Management
> http://git.reviewboard.kde.org/media/uploaded/files/2013/11/08/f711a85f-34f7-4b2c-99d2-f1c375fcf88f__python-plugins-redesigned.png
>  
> 
> Thanks,
> 
> Alex Turbov
> 
> 


[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/113720/">http://git.reviewboard.kde.org/r/113720/</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;">All in all, I like the \
patch very much except some minor issues.

A question I have, though: If a plugin cannot be loaded for e.g. some missing \
dependencies, previously, this error was displayed in the list view. I assume the \
error is now not displayed anymore? Or do I miss something? :-) Feedback to the user \
at this point is very important, if need be as a message box or so.

I think a review from Shaheed is very important. Shaheed, do you support this \
change?</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/113720/diff/1/?file=211991#file211991line46" \
style="color: black; font-weight: bold; text-decoration: \
underline;">addons/kate/pate/src/CMakeLists.txt</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">46</font></th>  <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">        <span \
class="s">plugins/block.desktop</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;">Should each \
plugin have an own CMakeLists.txt file, listing the install directives? Not a \
show-stopper, but still :)</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/113720/diff/1/?file=211992#file211992line21" \
style="color: black; font-weight: bold; text-decoration: \
underline;">addons/kate/pate/src/engine.h</a>  <span style="font-weight: normal;">

     (Diff revision 1)

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



 
 

 <tbody>

  <tr>
    <th bgcolor="#e9eaa8" style="border-right: 1px solid #C0C0C0;" \
align="right"><font size="2">21</font></th>  <td bgcolor="#fdfebc" width="50%"><pre \
style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="cp">#ifndef \
PATE_ENGINE_H</span></pre></td>  <th bgcolor="#e9eaa8" style="border-left: 1px solid \
#C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font \
size="2">21</font></th>  <td bgcolor="#fdfebc" width="50%"><pre style="font-size: \
8pt; line-height: 140%; margin: 0; "><span class="cp">#pragma once</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;">We are not \
using that at all in KDE, iirc. I&#39;m not sure whether all compilers support that. \
So there is no need to change that now, especially since this has nothing to do with \
the patch itself...</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/113720/diff/1/?file=211992#file211992line51" \
style="color: black; font-weight: bold; text-decoration: \
underline;">addons/kate/pate/src/engine.h</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">46</font></th>  <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">        <span \
class="n">KService</span><span class="o">::</span><span class="n">Ptr</span> <span \
class="n">m_srv</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;">Since this \
                is a public struct, we usually omit the m_ prefix in this case. And:
- srv -&gt; service
- module_file -&gt; moduleFile
- error_reason -&gt; errorReason</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/113720/diff/1/?file=211993#file211993line185" \
style="color: black; font-weight: bold; text-decoration: \
underline;">addons/kate/pate/src/engine.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; \
">PyMODINIT_FUNC PATE_INIT(void)</pre></td>

  </tr>
 </tbody>



 
 

 <tbody>

  <tr>
    <th bgcolor="#e9eaa8" style="border-right: 1px solid #C0C0C0;" \
align="right"><font size="2">181</font></th>  <td bgcolor="#fdfebc" width="50%"><pre \
style="font-size: 8pt; line-height: 140%; margin: 0; ">        <span \
class="n">s_self</span> <span class="o">=</span> <span class="k">new</span> <span \
class="n">Pate</span><span class="o">::</span><span class="n">Engine</span><span \
class="p">(</span><span class="n"><span class="hl">qApp</span></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">110</font></th>  <td bgcolor="#fdfebc" width="50%"><pre style="font-size: \
8pt; line-height: 140%; margin: 0; ">        <span class="n">s_self</span> <span \
class="o">=</span> <span class="k">new</span> <span class="n">Pate</span><span \
class="o">::</span><span class="n">Engine</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;">Now that \
the Pate::Engine() has no parent, who deletes finally? Maybe I&#39;m missing a delete \
call in the destructor of the Pate plugin or somehwere 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="http://git.reviewboard.kde.org/r/113720/diff/1/?file=211993#file211993line203" \
style="color: black; font-weight: bold; text-decoration: \
underline;">addons/kate/pate/src/engine.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">128</font></th>  <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span \
class="n">QModelIndex</span> <span class="n">Pate</span><span \
class="o">::</span><span class="n">Engine</span><span class="o">::</span><span \
class="n">index</span><span class="p">(</span><span class="k">const</span> <span \
class="kt">int</span> <span class="n">row</span><span class="p">,</span> <span \
class="k">const</span> <span class="kt">int</span> <span class="n">column</span><span \
class="p">,</span> <span class="k">const</span> <span \
class="n">QModelIndex</span><span class="o">&amp;</span> <span \
class="n">parent</span><span class="p">)</span> <span \
class="k">const</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;">This is an \
override, and in the .h-file row and column are just int and not const int. I&#39;d \
propose to use the exactly same signature.</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/113720/diff/1/?file=211993#file211993line239" \
style="color: black; font-weight: bold; text-decoration: \
underline;">addons/kate/pate/src/engine.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">164</font></th>  <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span \
class="n">QVariant</span> <span class="n">Pate</span><span class="o">::</span><span \
class="n">Engine</span><span class="o">::</span><span class="n">data</span><span \
class="p">(</span><span class="k">const</span> <span \
class="n">QModelIndex</span><span class="o">&amp;</span> <span \
class="n">index</span><span class="p">,</span> <span class="k">const</span> <span \
class="kt">int</span> <span class="n">role</span><span class="p">)</span> <span \
class="k">const</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;">save here: \
remove const from const int role.</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/113720/diff/1/?file=211993#file211993line291" \
style="color: black; font-weight: bold; text-decoration: \
underline;">addons/kate/pate/src/engine.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">216</font></th>  <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span \
class="kt">bool</span> <span class="n">Pate</span><span class="o">::</span><span \
class="n">Engine</span><span class="o">::</span><span class="n">setData</span><span \
class="p">(</span><span class="k">const</span> <span \
class="n">QModelIndex</span><span class="o">&amp;</span> <span \
class="n">index</span><span class="p">,</span> <span class="k">const</span> <span \
class="n">QVariant</span><span class="o">&amp;</span> <span \
class="n">value</span><span class="p">,</span> <span class="k">const</span> <span \
class="kt">int</span> <span class="n">role</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;">same \
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="http://git.reviewboard.kde.org/r/113720/diff/1/?file=211993#file211993line509" \
style="color: black; font-weight: bold; text-decoration: \
underline;">addons/kate/pate/src/engine.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">352</font></th>  <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">            \
<span class="s">&quot;X-Python-3-Compatible&quot;</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;">This is the \
major question of the patch: Is a distinction between 2 and 3 enough? Wasn&#39;t \
python 3.3 incompatible to e.g. 3.0?</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/113720/diff/1/?file=211993#file211993line578" \
style="color: black; font-weight: bold; text-decoration: \
underline;">addons/kate/pate/src/engine.cpp</a>  <span style="font-weight: normal;">

     (Diff revision 1)

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



 
 

 <tbody>

  <tr>
    <th bgcolor="#e9eaa8" style="border-right: 1px solid #C0C0C0;" \
align="right"><font size="2">383</font></th>  <td bgcolor="#fdfebc" width="50%"><pre \
style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span \
class="n">QStandardItem</span> <span class="o">*</span><span class="n">root</span> \
<span class="o">=</span> <span class="n">invisibleRootItem</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">420</font></th>  <td bgcolor="#fdfebc" width="50%"><pre style="font-size: \
8pt; line-height: 140%; margin: 0; ">        <span class="n">QList</span><span \
class="o">&lt;</span><span class="n">PluginState</span><span \
class="o">&gt;::</span><span class="n">iterator</span> <span class="n">it</span> \
<span class="o">=</span> <span class="n">m_plugins</span><span \
class="p">.</span><span class="n">begin</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;">Since you \
cache the end iterator value: Is it possible to use a const_iterator 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="http://git.reviewboard.kde.org/r/113720/diff/1/?file=211995#file211995line5" \
style="color: black; font-weight: bold; text-decoration: \
underline;">addons/kate/pate/src/manager.ui</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">5</font></th>  <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">  \
&lt;property name=&quot;geometry&quot;&gt;</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;">In another \
commit, you just removed these lines ;)</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/113720/diff/1/?file=211997#file211997line173" \
style="color: black; font-weight: bold; text-decoration: \
underline;">addons/kate/pate/src/plugin.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; ">uint \
Pate::Plugin::configPages() const</pre></td>

  </tr>
 </tbody>



 
 

 <tbody>

  <tr>
    <th bgcolor="#e9eaa8" style="border-right: 1px solid #C0C0C0;" \
align="right"><font size="2">167</font></th>  <td bgcolor="#fdfebc" width="50%"><pre \
style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span \
class="n">PyObject</span><span class="hl"> </span><span class="o"><span \
class="hl">*</span></span><span class="n">tuple</span> <span class="o">=</span> <span \
class="n">m_moduleConfigPages</span><span class="p">.</span><span \
class="n">at</span><span class="p">(</span><span class="n">number</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">165</font></th>  <td bgcolor="#fdfebc" width="50%"><pre style="font-size: \
8pt; line-height: 140%; margin: 0; ">    <span class="n">PyObject</span><span \
class="o"><span class="hl">*</span></span><span class="hl"> </span><span \
class="n">tuple</span> <span class="o">=</span> <span \
class="n">m_moduleConfigPages</span><span class="p">.</span><span \
class="n">at</span><span class="p">(</span><span class="n">number</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;">Picked an \
arbitrary line:

Some prefer Type* variable; some Type *variable; some Type * variable;

I&#39;m not convinced that Type* variable; is so much better than Type *variable to \
justify moving the * :-)

Not really an issue, though.

PS: I prefer Type * variable. This way, the &#39;*&#39; is best visible.</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/113720/diff/1/?file=211997#file211997line268" \
style="color: black; font-weight: bold; text-decoration: \
underline;">addons/kate/pate/src/plugin.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; \
">QString Pate::Plugin::configPageName(uint number) const</pre></td>

  </tr>
 </tbody>



 
 

 <tbody>

  <tr>
    <th bgcolor="#e9eaa8" style="border-right: 1px solid #C0C0C0;" \
align="right"><font size="2">262</font></th>  <td bgcolor="#fdfebc" width="50%"><pre \
style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span \
class="n">connect</span><span class="p">(</span><span class="n">m_manager</span><span \
class="p">.</span><span class="n">tree</span><span class="o">-&gt;</span><span \
class="n">model</span><span class="p">(),</span> <span class="n">SIGNAL</span><span \
class="p">(</span><span class="n">itemChanged</span><span class="p">(</span><span \
class="n">QStandardItem</span> <span class="o">*</span><span class="p">)),</span> \
<span class="n">SIGNAL</span><span class="p">(</span><span \
class="n">changed</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">260</font></th>  <td bgcolor="#fdfebc" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span \
class="cp">#if 0</span><span class="c"></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;">Please \
remove dead code, if not needed ;)</pre> </div>
<br />



<p>- Dominik Haumann</p>


<br />
<p>On November 8th, 2013, 6:09 a.m. UTC, Alex Turbov 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 Kate and Shaheed Haque.</div>
<div>By Alex Turbov.</div>


<p style="color: grey;"><i>Updated Nov. 8, 2013, 6:09 a.m.</i></p>









<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt;">Repository: </b>
kate
</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;">Search installed Python plugins via trader.  Introduce \
`Kate/PythonPlugin` service type.  Make plugins management look-n-feel as C++ \
plugins. Enabled plugins now are per session (stored under &quot;Enabled \
Plugins&quot; key of the pate config group), so it is possible to have different \
plugins in different sessions (just like C++ plugins).

Sample .desktop file:

[Desktop Entry]
Type=Service
ServiceTypes=Kate/PythonPlugin
X-KDE-Library=cmake_utils/cmake_utils.py
Name=CMake Utilities
Comment=Code completer, cache and help browser
X-Python-2-Compatible=false
X-Python-3-Compatible=true

The patch contains .desktop files only for plugins I wrote (and use) myself. Other \
plugins still need .desktop files (I don&#39;t know exactly which Python they are \
require)</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>addons/kate/pate/src/utilities.cpp <span style="color: \
grey">(3ed19d6)</span></li>

 <li>addons/kate/pate/src/utilities.h <span style="color: grey">(d88af0f)</span></li>

 <li>addons/kate/pate/src/plugins/format.desktop <span style="color: \
grey">(PRE-CREATION)</span></li>

 <li>addons/kate/pate/src/plugins/expand.desktop <span style="color: \
grey">(PRE-CREATION)</span></li>

 <li>addons/kate/pate/src/plugins/commentar.desktop <span style="color: \
grey">(PRE-CREATION)</span></li>

 <li>addons/kate/pate/src/plugins/color_tools.desktop <span style="color: \
grey">(PRE-CREATION)</span></li>

 <li>addons/kate/pate/src/plugins/cmake_utils/cmake_utils.desktop <span style="color: \
grey">(PRE-CREATION)</span></li>

 <li>addons/kate/pate/src/plugins/block.desktop <span style="color: \
grey">(PRE-CREATION)</span></li>

 <li>addons/kate/pate/src/plugin.cpp <span style="color: grey">(85c84a3)</span></li>

 <li>addons/kate/pate/src/plugin.h <span style="color: grey">(77369c6)</span></li>

 <li>addons/kate/pate/src/manager.ui <span style="color: grey">(82213ee)</span></li>

 <li>addons/kate/pate/src/katepythonplugin.desktop <span style="color: \
grey">(PRE-CREATION)</span></li>

 <li>addons/kate/pate/src/engine.cpp <span style="color: grey">(5484473)</span></li>

 <li>addons/kate/pate/src/engine.h <span style="color: grey">(6c70ab9)</span></li>

 <li>addons/kate/pate/src/CMakeLists.txt <span style="color: \
grey">(78bbdc0)</span></li>

</ul>

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



<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">File Attachments \
</h1>

<ul>

 <li><a href="http://git.reviewboard.kde.org/media/uploaded/files/2013/11/08/f711a85f-34f7-4b2c-99d2-f1c375fcf88f__python-plugins-redesigned.png">Python \
Plugins Management</a></li>

</ul>





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








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



_______________________________________________
KWrite-Devel mailing list
KWrite-Devel@kde.org
https://mail.kde.org/mailman/listinfo/kwrite-devel


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

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