[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:       "Giorgos Tsiapaliwkas" <terietor () gmail ! com>
Date:       2011-10-30 7:45:18
Message-ID: 20111030074518.28843.6481 () vidsolbach ! de
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


> On Oct. 25, 2011, 11:02 a.m., Aaron J. Seigo wrote:
> > editors/editpage.cpp, lines 109-110
> > <http://git.reviewboard.kde.org/r/102290/diff/3/?file=39420#file39420line109>
> > 
> > such a check is necessary indeed .. however, i believe KIO::CopyJob provides this \
> > internally already. have you tested this?

i replaced KIO::Overwrite with KIO::HideProgressInfo,and the issue was solved


> On Oct. 25, 2011, 11:02 a.m., Aaron J. Seigo wrote:
> > editors/imageviewer/imageviewer.cpp, lines 39-42
> > <http://git.reviewboard.kde.org/r/102290/diff/3/?file=39422#file39422line39>
> > 
> > this will not work as widget is created on the stack, so as soon the if statement \
> > is done it will be automatically deleted.

fixed


> On Oct. 25, 2011, 11:02 a.m., Aaron J. Seigo wrote:
> > editors/imageviewer/imageviewer.cpp, line 36
> > <http://git.reviewboard.kde.org/r/102290/diff/3/?file=39422#file39422line36>
> > 
> > this is going to cause problems on re-use. QWidget does not let you set a layout \
> > on a widget if it already has one. 
> > i really, really recommend creating the layout in the consructor, adding a \
> > QSvgWidget* and a QLabel* member to this class and using those in setImage, \
> > e.g.:' 
> > if (..svg...) {
> > delete m_label;
> > if (!m_svgWidget) {
> > ... create svg widget  . add it to the layout() .
> > }
> > m_svgWidget->load(m_image);
> > } else {
> > delete m_svgWidget;
> > if (!m_label) {
> > ...etc
> > 

ISSUE:In order to create the layout in the constructor i had to newing the QLabel* \
and QSVGWidget* in the ctor....


- Giorgos


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/102290/#review7593
-----------------------------------------------------------


On Oct. 20, 2011, 8:49 a.m., Giorgos Tsiapaliwkas wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/102290/
> -----------------------------------------------------------
> 
> (Updated Oct. 20, 2011, 8:49 a.m.)
> 
> 
> Review request for Plasma and Aaron J. Seigo.
> 
> 
> Description
> -------
> 
> 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
> -----
> 
> CMakeLists.txt f3f32a9 
> editors/editpage.h 7b5dca3 
> editors/editpage.cpp d4b0082 
> editors/imageviewer/imageviewer.h e69de29 
> editors/imageviewer/imageviewer.cpp e69de29 
> main.cpp 66a7cd8 
> mainwindow.h 1b1c2a2 
> mainwindow.cpp 2fa2742 
> packagemodel.cpp 8c0907a 
> 
> Diff: http://git.reviewboard.kde.org/r/102290/diff/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 Tsiapaliwkas
> 
> 


[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 />








<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;">  <p style="margin-top: 0;">On October 25th, 2011, 11:02 a.m., <b>Aaron J. \
Seigo</b> wrote:</p>  <blockquote style="margin-left: 1em; border-left: 2px solid \
#d0d0d0; padding-left: 10px;">  



<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/3/?file=39420#file39420line109" \
style="color: black; font-weight: bold; text-decoration: \
underline;">editors/editpage.cpp</a>  <span style="font-weight: normal;">

     (Diff revision 3)

    </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::showTreeContextMenu(const QPoint&amp;)</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">108</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">: do we need a \
check if for the selected files????? Write now if i select a file that already exists \
in the images folder i will not</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">109</font></th>  <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">            \
<span class="c1">//be informed.</span></pre></td>  </tr>

 </tbody>

</table>

  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">such a check is \
necessary indeed .. however, i believe KIO::CopyJob provides this internally already. \
have you tested this?</pre>  </blockquote>





</blockquote>
<pre style="margin-left: 1em; white-space: pre-wrap; white-space: -moz-pre-wrap; \
white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">i replaced \
KIO::Overwrite with KIO::HideProgressInfo,and the issue was solved</pre> <br />

<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;">  <p style="margin-top: 0;">On October 25th, 2011, 11:02 a.m., <b>Aaron J. \
Seigo</b> wrote:</p>  <blockquote style="margin-left: 1em; border-left: 2px solid \
#d0d0d0; padding-left: 10px;">  



<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/3/?file=39422#file39422line36" \
style="color: black; font-weight: bold; text-decoration: \
underline;">editors/imageviewer/imageviewer.cpp</a>  <span style="font-weight: \
normal;">

     (Diff revision 3)

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

 <tbody style="background-color: #e4d9cb; padding: 4px 8px; text-align: center;">
  <tr>

   <td colspan="2"><pre style="font-size: 8pt; line-height: 140%; margin: 0; \
"></pre></td>  <td colspan="2"><pre style="font-size: 8pt; line-height: 140%; margin: \
0; ">void ImageViewer::setImage(const KUrl&amp; image)</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">36</font></th>  <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span \
class="n">QHBoxLayout</span> <span class="o">*</span><span class="n">layout</span> \
<span class="o">=</span> <span class="k">new</span> <span \
class="n">QHBoxLayout</span><span class="p">();</span></pre></td>  </tr>

 </tbody>

</table>

  <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 is going to cause \
problems on re-use. QWidget does not let you set a layout on a widget if it already \
has one.

i really, really recommend creating the layout in the consructor, adding a \
QSvgWidget* and a QLabel* member to this class and using those in setImage, \
e.g.:&#39;

if (..svg...) {
     delete m_label;
     if (!m_svgWidget) {
          ... create svg widget  . add it to the layout() .
     }
    m_svgWidget-&gt;load(m_image);
} else {
    delete m_svgWidget;
    if (!m_label) {
...etc
</pre>
 </blockquote>





</blockquote>
<pre style="margin-left: 1em; white-space: pre-wrap; white-space: -moz-pre-wrap; \
white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">ISSUE:In \
order to create the layout in the constructor i had to newing the QLabel* and \
QSVGWidget* in the ctor....</pre> <br />

<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;">  <p style="margin-top: 0;">On October 25th, 2011, 11:02 a.m., <b>Aaron J. \
Seigo</b> wrote:</p>  <blockquote style="margin-left: 1em; border-left: 2px solid \
#d0d0d0; padding-left: 10px;">  



<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/3/?file=39422#file39422line39" \
style="color: black; font-weight: bold; text-decoration: \
underline;">editors/imageviewer/imageviewer.cpp</a>  <span style="font-weight: \
normal;">

     (Diff revision 3)

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

 <tbody style="background-color: #e4d9cb; padding: 4px 8px; text-align: center;">
  <tr>

   <td colspan="2"><pre style="font-size: 8pt; line-height: 140%; margin: 0; \
"></pre></td>  <td colspan="2"><pre style="font-size: 8pt; line-height: 140%; margin: \
0; ">void ImageViewer::setImage(const KUrl&amp; image)</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">39</font></th>  <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">        <span \
class="n">QSvgWidget</span> <span class="n">widget</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">40</font></th>  <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">        <span \
class="n">widget</span><span class="p">.</span><span class="n">load</span><span \
class="p">(</span><span class="n">m_image</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">41</font></th>  <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">        <span \
class="n">layout</span><span class="o">-&gt;</span><span \
class="n">setAlignment</span><span class="p">(</span><span class="n">Qt</span><span \
class="o">::</span><span class="n">AlignHCenter</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">42</font></th>  <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">        <span \
class="n">layout</span><span class="o">-&gt;</span><span \
class="n">addWidget</span><span class="p">(</span><span class="o">&amp;</span><span \
class="n">widget</span><span class="p">);</span></pre></td>  </tr>

 </tbody>

</table>

  <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 will not work as \
widget is created on the stack, so as soon the if statement is done it will be \
automatically deleted.</pre>  </blockquote>





</blockquote>
<pre style="margin-left: 1em; white-space: pre-wrap; white-space: -moz-pre-wrap; \
white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">fixed \
</pre> <br />




<p>- Giorgos</p>


<br />
<p>On October 20th, 2011, 8:49 a.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 Oct. 20, 2011, 8:49 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;">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>CMakeLists.txt <span style="color: grey">(f3f32a9)</span></li>

 <li>editors/editpage.h <span style="color: grey">(7b5dca3)</span></li>

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

 <li>editors/imageviewer/imageviewer.h <span style="color: \
grey">(e69de29)</span></li>

 <li>editors/imageviewer/imageviewer.cpp <span style="color: \
grey">(e69de29)</span></li>

 <li>main.cpp <span style="color: grey">(66a7cd8)</span></li>

 <li>mainwindow.h <span style="color: grey">(1b1c2a2)</span></li>

 <li>mainwindow.cpp <span style="color: grey">(2fa2742)</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