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

List:       kde-frameworks-devel
Subject:    Re: Review Request 127201: Fix svg icon path resolving in IconItem
From:       Xuetian Weng <wengxt () gmail ! com>
Date:       2016-02-28 17:46:02
Message-ID: 20160228174602.12079.82555 () mimi ! kde ! org
[Download RAW message or body]

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



> On Feb. 28, 2016, 9:58 a.m., David Rosca wrote:
> > autotests/iconitemtest.cpp, line 234
> > <https://git.reviewboard.kde.org/r/127201/diff/2/?file=445755#file445755line234>
> > 
> > Why?
> 
> Xuetian Weng wrote:
> Actually this check is not so reliable if the icon is not rendered with the same \
> svg backend but it will pass for now. 
> David Rosca wrote:
> But both items use exactly the same icon, so they should be rendered the same. Do \
> you have example when it fails?

You could try to move bug359388.svg to data/icons/test-theme/apps/22/ , and comment \
out the QSKIP.

I guess the problem is that it might just render a svg scaled in some cases when \
using QIcon, in some other cases, it will just render the svg directly to the correct \
size.


- Xuetian


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


On Feb. 28, 2016, 5:15 p.m., Xuetian Weng wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/127201/
> -----------------------------------------------------------
> 
> (Updated Feb. 28, 2016, 5:15 p.m.)
> 
> 
> Review request for KDE Frameworks, Plasma, Kai Uwe Broulik, David Rosca, and Marco \
> Martin. 
> 
> Repository: plasma-framework
> 
> 
> Description
> -------
> 
> Well.. the bug should be obvious:
> 1. QString iconPath overrides the iconPath in a higher scope. introduced in \
> https://git.reviewboard.kde.org/r/126168/ 2. iconPath not assigned, also introduced \
> in https://git.reviewboard.kde.org/r/126168/ 3. svgz -> svg?? introduced in \
> https://git.reviewboard.kde.org/r/126557/ 
> 
> Diffs
> -----
> 
> autotests/data/bug359388/hicolor/22x22/apps/bug359388.svg PRE-CREATION 
> autotests/data/icons/hicolor/22x22/apps/bug359388.svg 8739af5 
> autotests/data/icons/test-theme/apps/22/tst-plasma-framework-test-icon.svg \
> PRE-CREATION  autotests/data/icons/test-theme/apps/32/tst-plasma-framework-test-icon.svg \
> PRE-CREATION  autotests/data/icons/test-theme/apps/48/konversation.svg PRE-CREATION \
>  autotests/data/icons/test-theme/index.theme PRE-CREATION 
> autotests/iconitemtest.h 9fd3063 
> autotests/iconitemtest.cpp ea98c9d 
> src/declarativeimports/core/iconitem.cpp c65a9a7 
> 
> Diff: https://git.reviewboard.kde.org/r/127201/diff/
> 
> 
> Testing
> -------
> 
> tested with qmlscene with Plasma.IconItem.
> 
> 
> Thanks,
> 
> Xuetian Weng
> 
> 


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




<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/127201/">https://git.reviewboard.kde.org/r/127201/</a>
  </td>
    </tr>
   </table>
   <br />










<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;">  <p style="margin-top: 0;">On February 28th, 2016, 9:58 a.m. UTC, <b>David \
Rosca</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="https://git.reviewboard.kde.org/r/127201/diff/2/?file=445755#file445755line234" \
style="color: black; font-weight: bold; text-decoration: \
underline;">autotests/iconitemtest.cpp</a>  <span style="font-weight: normal;">

     (Diff revision 2)

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



 
 

 <tbody>

  <tr>
    <th bgcolor="#e9eaa8" style="border-right: 1px solid #C0C0C0;" \
align="right"><font size="2">210</font></th>  <td bgcolor="#fdfebc" width="50%"><pre \
style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span \
class="n">QCOMPARE</span><span class="p">(</span><span \
class="n">grabImage</span><span class="p">(</span><span class="n">item1</span><span \
class="p">),</span> <span class="n">grabImage</span><span class="p">(</span><span \
class="n">item2</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">234</font></th>  <td bgcolor="#fdfebc" width="50%"><pre \
style="font-size: 8pt; line-height: 140%; margin: 0; ">   <span class="hl"> \
</span><span class="c1"><span class="hl">//</span> QCOMPARE(grabImage(item1), \
grabImage(item2));</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;"><p style="padding: \
0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: \
inherit;">Why?</p></pre>  </blockquote>



 <p>On February 28th, 2016, 5:12 p.m. UTC, <b>Xuetian Weng</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;">  <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;">Actually this check is not so reliable if the icon is not rendered with the \
same svg backend but it will pass for now.</p></pre>  </blockquote>





 <p>On February 28th, 2016, 5:23 p.m. UTC, <b>David Rosca</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;">  <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;">But \
both items use exactly the same icon, so they should be rendered the same. Do you \
have example when it fails?</p></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;"><p \
style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: \
inherit;">You could try to move bug359388.svg to data/icons/test-theme/apps/22/ , and \
comment out the QSKIP.</p> <p style="padding: 0;text-rendering: inherit;margin: \
0;line-height: inherit;white-space: inherit;">I guess the problem is that it might \
just render a svg scaled in some cases when using QIcon, in some other cases, it will \
just render the svg directly to the correct size.</p></pre> <br />




<p>- Xuetian</p>


<br />
<p>On February 28th, 2016, 5:15 p.m. UTC, Xuetian Weng 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, Plasma, Kai Uwe Broulik, David Rosca, and \
Marco Martin.</div> <div>By Xuetian Weng.</div>


<p style="color: grey;"><i>Updated Feb. 28, 2016, 5:15 p.m.</i></p>









<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt;">Repository: </b>
plasma-framework
</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;">Well.. the bug should be obvious: 1. QString iconPath \
overrides the iconPath in a higher scope. introduced in \
https://git.reviewboard.kde.org/r/126168/ 2. iconPath not assigned, also introduced \
in https://git.reviewboard.kde.org/r/126168/ 3. svgz -&gt; svg?? introduced in \
https://git.reviewboard.kde.org/r/126557/</p></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;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">tested with qmlscene with Plasma.IconItem.</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>autotests/data/bug359388/hicolor/22x22/apps/bug359388.svg <span style="color: \
grey">(PRE-CREATION)</span></li>

 <li>autotests/data/icons/hicolor/22x22/apps/bug359388.svg <span style="color: \
grey">(8739af5)</span></li>

 <li>autotests/data/icons/test-theme/apps/22/tst-plasma-framework-test-icon.svg <span \
style="color: grey">(PRE-CREATION)</span></li>

 <li>autotests/data/icons/test-theme/apps/32/tst-plasma-framework-test-icon.svg <span \
style="color: grey">(PRE-CREATION)</span></li>

 <li>autotests/data/icons/test-theme/apps/48/konversation.svg <span style="color: \
grey">(PRE-CREATION)</span></li>

 <li>autotests/data/icons/test-theme/index.theme <span style="color: \
grey">(PRE-CREATION)</span></li>

 <li>autotests/iconitemtest.h <span style="color: grey">(9fd3063)</span></li>

 <li>autotests/iconitemtest.cpp <span style="color: grey">(ea98c9d)</span></li>

 <li>src/declarativeimports/core/iconitem.cpp <span style="color: \
grey">(c65a9a7)</span></li>

</ul>

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






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







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


--===============5599265297241749041==--


[Attachment #3 (text/plain)]

_______________________________________________
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