<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/125877/">https://git.reviewboard.kde.org/r/125877/</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 29th, 2015, 8:26 p.m. UTC, <b>Aleix Pol Gonzalez</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/125877/diff/1/?file=413361#file413361line237" style="color: black; font-weight: bold; text-decoration: underline;">autotests/kdeplatformtheme_unittest.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; ">private Q_SLOTS:</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">237</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">        <span class="n">QCOMPARE</span><span class="p">(</span><span class="n">m_qpa</span><span class="o">-></span><span class="n">themeHint</span><span class="p">(</span><span class="n">QPlatformTheme</span><span class="o">::</span><span class="n">WheelScrollLines</span><span class="p">).</span><span class="n">toInt</span><span class="p">(),</span> <span class="mi">122</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;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">What does <code style="text-rendering: inherit;color: #4444cc;padding: 0;white-space: normal;margin: 0;line-height: inherit;">qApp->wheelScrollLines()</code> return now?</p></pre>
 </blockquote>



 <p>On October 29th, 2015, 8:30 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;">It returned the value I have set in mouse kcm, because the test KdePlatformTheme is not installed to qApp (and WheelScrollLines is now set as themeHint instead of directly calling qApp->setWheelScrollLines)</p></pre>
 </blockquote>





 <p>On October 29th, 2015, 8:38 p.m. UTC, <b>Aleix Pol Gonzalez</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;">So the behavior on all applications that used qApp->wheelScrollLines() changed now?</p></pre>
 </blockquote>





 <p>On October 29th, 2015, 8:43 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;">No, it just can't be set with QApplication::setWheelScrollLines (from KdePlatformTheme constructor) because QApplication is querying QPlatformTheme for the value. </p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">That is with Qt 5.5, older version didn't have the WheelScrollLines hint.</p></pre>
 </blockquote>





 <p>On November 3rd, 2015, 9:41 a.m. UTC, <b>Marco Martin</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;">if QApplication is querying QPlatformTheme for wheelScrollLines(), why do you have to use themeHint directly?</p></pre>
 </blockquote>





 <p>On November 3rd, 2015, 9:48 a.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;">Because that's what this autotest is doing (see how the other themeHints are tested above). It just tests if the KdePlatformTheme correctly gets the value from config.</p></pre>
 </blockquote>





 <p>On November 6th, 2015, 7:55 a.m. UTC, <b>David Faure</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;">So why not test both, i.e. turn #else into #endif?</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;">Because the platform theme used by QTest QApplication is created before prepareEnvironment() is called, thus it uses the user's kdeglobals and not the one used by tests.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">If we fix it, eg with:</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;"><div class="codehilite" style="background: #f8f8f8"><pre style="line-height: 125%"><span style="color: #008000; font-weight: bold">int</span> <span style="color: #008000; font-weight: bold">main</span><span style="color: #666666">(</span><span style="color: #008000; font-weight: bold">int</span> <span style="color: #008000; font-weight: bold">argc</span><span style="color: #666666">,</span> <span style="color: #008000; font-weight: bold">char</span> <span style="color: #666666">*</span><span style="color: #008000; font-weight: bold">argv</span><span style="color: #BC7A00">[]</span><span style="color: #666666">)</span>
{
    prepareEnvironment();
    qputenv(<span style="color: #BA2121">"QT_QPA_PLATFORMTHEME"</span><span style="color: #666666">,</span> QByteArrayLiteral(<span style="color: #BA2121">"kde"</span>));
    QApplication app(argc<span style="color: #666666">,</span> argv);
    KdePlatformTheme_UnitTest t;
    return QTest<span style="color: #666666">::</span>qExec(<span style="color: #666666">&</span>t<span style="color: #666666">,</span> argc<span style="color: #666666">,</span> argv);
}
</pre></div>
</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">instead of using Q_COREAPP_STARTUP_FUNCTION, then we can test the QApplication directly (not only wheelScrollLines, but every other hints).</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">I can rewrite the test according to this, if it's fine.</p></pre>
<br />




<p>- David</p>


<br />
<p>On October 29th, 2015, 8:22 p.m. UTC, David Rosca 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.</div>
<div>By David Rosca.</div>


<p style="color: grey;"><i>Updated Oct. 29, 2015, 8:22 p.m.</i></p>









<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt;">Repository: </b>
frameworkintegration
</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;">see summary</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/kdeplatformtheme_unittest.cpp <span style="color: grey">(f660ffd)</span></li>

</ul>

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






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







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