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

List:       kde-panel-devel
Subject:    Re: Review Request: Plasmate:images can now be added to projects
From:       "Aaron J. Seigo" <aseigo () kde ! org>
Date:       2011-08-11 8:05:58
Message-ID: 20110811080558.4790.63928 () 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/102290/#review5616
-----------------------------------------------------------



editors/editpage.cpp
<http://git.reviewboard.kde.org/r/102290/#comment5031>

    it should start wherever the default desktop wide location is, and re-open to the \
last used directory (if any). you can control where it starts with setUrl



editors/editpage.cpp
<http://git.reviewboard.kde.org/r/102290/#comment5020>

    any: peg, png, svg ...



editors/editpage.cpp
<http://git.reviewboard.kde.org/r/102290/#comment5027>

    no point in newing this; and rightnow it is leaking as it is never deleted.



editors/editpage.cpp
<http://git.reviewboard.kde.org/r/102290/#comment5028>

    foreach ( <-- whitespace :)



packagemodel.cpp
<http://git.reviewboard.kde.org/r/102290/#comment5030>

    i would probably write this as:
    
    if (index.row() == 0) {
        if (qstrcmp(key, "images") {
            return QStringList("[plasmate]/image");
        }
    
        return QStringList("[plasmate]/new");
    }
    
    clearer to understand that the important thing is that it's the first item in the \
branch (row() == 0) and that different types are returned depending on where in the \
package we are.


- Aaron J.


On Aug. 10, 2011, 6:29 p.m., Giorgos Tsiapaliwkas wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/102290/
> -----------------------------------------------------------
> 
> (Updated Aug. 10, 2011, 6:29 p.m.)
> 
> 
> Review request for Plasma and Aaron J. Seigo.
> 
> 
> Summary
> -------
> 
> hello,
> 
> without this patch a user cannot add an image with plasmate.
> 
> reproduce,go to files-images-new,the plasmate will open a text editor instead of a \
> dialog,which(the dialog) is able to open an image. 
> With the patch a dialog will open asking for an image.
> 
> 
> Diffs
> -----
> 
> editors/editpage.h 7b5dca3 
> editors/editpage.cpp d4b0082 
> packagemodel.cpp 8c0907a 
> 
> Diff: http://git.reviewboard.kde.org/r/102290/diff
> 
> 
> Testing
> -------
> 
> the patch is not ready yet,i have noted some questions.
> Also the plasmate tries to open the image with a text editor.This have to be \
> fixed,but how?Should we make plasmate able to preview images? 
> In addition,when you add something in the list of files(using the different options \
> provided by the files qdockwidget) it names it as "new".This has to be fixed and \
> the plasmate has to show the real name of the file.(different request,i just want \
> an approval for this patch). 
> 
> Thanks,
> 
> Giorgos
> 
> 


[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/102290/">http://git.reviewboard.kde.org/r/102290/</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="http://git.reviewboard.kde.org/r/102290/diff/1/?file=31661#file31661line103" \
style="color: black; font-weight: bold; text-decoration: \
underline;">editors/editpage.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; ">void \
EditPage::findEditor(const QModelIndex &amp;index)</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">103</font></th>  <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">            \
<span class="c1">//</span><span class="cs">TODO</span><span class="c1">: the dialog \
doesn&#39;t start at the $HOMEDIR</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 should \
start wherever the default desktop wide location is, and re-open to the last used \
directory (if any). you can control where it starts with setUrl</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/102290/diff/1/?file=31661#file31661line104" \
style="color: black; font-weight: bold; text-decoration: \
underline;">editors/editpage.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; ">void \
EditPage::findEditor(const QModelIndex &amp;index)</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">104</font></th>  <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">            \
<span class="c1">//</span><span class="cs">TODO</span><span class="c1">: i didn&#39;t \
set an appropriate filter because i didn&#39;t know which type of images the plasmate \
should support</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;">any: peg, \
png, svg ...</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/102290/diff/1/?file=31661#file31661line105" \
style="color: black; font-weight: bold; text-decoration: \
underline;">editors/editpage.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; ">void \
EditPage::findEditor(const QModelIndex &amp;index)</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">105</font></th>  <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">            \
<span class="n">KFileDialog</span><span class="o">*</span> <span \
class="n">imageDialog</span> <span class="o">=</span> <span class="k">new</span> \
<span class="n">KFileDialog</span><span class="p">(</span><span \
class="n">homeDir</span><span class="p">,</span> <span \
class="s">&quot;*&quot;</span><span class="p">,</span> <span \
class="k">this</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;">no point in \
newing this; and rightnow it is leaking as it is never deleted.</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/102290/diff/1/?file=31661#file31661line110" \
style="color: black; font-weight: bold; text-decoration: \
underline;">editors/editpage.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; ">void \
EditPage::findEditor(const QModelIndex &amp;index)</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">110</font></th>  <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">            \
<span class="n">foreach</span><span class="p">(</span><span class="k">const</span> \
<span class="n">KUrl</span> <span class="n">source</span><span class="p">,</span> \
<span class="n">srcDir</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;">foreach ( \
&lt;-- whitespace :)</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/102290/diff/1/?file=31662#file31662line171" \
style="color: black; font-weight: bold; text-decoration: \
underline;">packagemodel.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; \
">QVariant PackageModel::data(const QModelIndex &amp;index, int role) \
const</pre></td>

  </tr>
 </tbody>



 
 




 <tbody>

  <tr>
    <th bgcolor="#e9eaa8" style="border-right: 1px solid #C0C0C0;" \
align="right"><font size="2">168</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">index</span><span \
class="p">.</span><span class="n">row</span><span class="p">()</span> <span \
class="o">==</span> <span class="mi">0</span><span class="p">)</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">170</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"><span class="hl">QString</span></span><span \
class="p"><span class="hl">(</span></span><span class="n"><span \
class="hl">key</span></span><span class="p"><span class="hl">)</span></span><span \
class="hl"> </span><span class="o"><span class="hl">==</span></span><span class="hl"> \
</span><span class="s"><span class="hl">&quot;images&quot;</span></span><span \
class="hl"> </span><span class="o"><span class="hl">&amp;&amp;</span></span><span \
class="hl"> </span><span class="n">index</span><span class="p">.</span><span \
class="n">row</span><span class="p">()</span> <span class="o">==</span> <span \
class="mi">0</span><span class="p">)</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">171</font></th>  <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">              \
<span class="k">return</span> <span class="n">QStringList</span><span \
class="p">(</span><span class="s">&quot;[plasmate]/image&quot;</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">172</font></th>  <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">            \
<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">173</font></th>  <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">            \
<span class="k">else</span> <span class="k">if</span> <span class="p">(</span><span \
class="n">index</span><span class="p">.</span><span class="n">row</span><span \
class="p">()</span> <span class="o">==</span> <span class="mi">0</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;">i would \
probably write this as:

if (index.row() == 0) {
    if (qstrcmp(key, &quot;images&quot;) {
        return QStringList(&quot;[plasmate]/image&quot;);
    }

    return QStringList(&quot;[plasmate]/new&quot;);
}

clearer to understand that the important thing is that it&#39;s the first item in the \
branch (row() == 0) and that different types are returned depending on where in the \
package we are.</pre> </div>
<br />



<p>- Aaron J.</p>


<br />
<p>On August 10th, 2011, 6:29 p.m., Giorgos Tsiapaliwkas 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 Aaron J. Seigo.</div>
<div>By Giorgos Tsiapaliwkas.</div>


<p style="color: grey;"><i>Updated Aug. 10, 2011, 6:29 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;">hello,

without this patch a user cannot add an image with plasmate.

reproduce,go to files-images-new,the plasmate will open a text editor instead of a \
dialog,which(the dialog) is able to open an image.

With the patch a dialog will open asking for an image.
</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;">the patch is not ready yet,i have noted some questions. Also the \
plasmate tries to open the image with a text editor.This have to be fixed,but \
how?Should we make plasmate able to preview images?

In addition,when you add something in the list of files(using the different options \
provided by the files qdockwidget) it names it as &quot;new&quot;.This has to be \
fixed and the plasmate has to show the real name of the file.(different request,i \
just want an approval for this patch).</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>editors/editpage.h <span style="color: grey">(7b5dca3)</span></li>

 <li>editors/editpage.cpp <span style="color: grey">(d4b0082)</span></li>

 <li>packagemodel.cpp <span style="color: grey">(8c0907a)</span></li>

</ul>

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