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










<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
 <p style="margin-top: 0;">On January 20th, 2015, 4:16 p.m. UTC, <b>David Faure</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/122168/diff/1/?file=343470#file343470line99" style="color: black; font-weight: bold; text-decoration: underline;">src/kcmoduleproxy.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 KCModuleProxyPrivate::loadModule()</pre></td>

  </tr>
 </tbody>



 
 

 <tbody>

  <tr>
    <th bgcolor="#f0f0f0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">98</font></th>
    <td bgcolor="#ffffff" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">        <span class="n">dbusService</span> <span class="o">=</span> <span class="n">QLatin1String</span><span class="p">(</span><span class="s">"org.kde.internal.KSettingsWidget_"</span><span class="p">)</span> <span class="o">+</span> <span class="n">name</span><span class="p">;</span></pre></td>
    <th bgcolor="#f0f0f0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">99</font></th>
    <td bgcolor="#ffffff" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">        <span class="n">dbusService</span> <span class="o">=</span> <span class="n">QLatin1String</span><span class="p">(</span><span class="s">"org.kde.internal.KSettingsWidget_"</span><span class="p">)</span> <span class="o">+</span> <span class="n">name</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;">... while this line is happy with dots.</p></pre>
 </blockquote>



 <p>On January 20th, 2015, 4:18 p.m. UTC, <b>Hugo Pereira Da Costa</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;">ok. Got it now. Thanks !</p></pre>
 </blockquote>





 <p>On January 21st, 2015, 9:42 a.m. UTC, <b>Hugo Pereira Da Costa</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;">Stupid question: does it not also apply to the two lines above (replacement of '-' and '/' by '_') ? And if yes, should I also 'fix' that in the same review ?</p></pre>
 </blockquote>





 <p>On January 21st, 2015, 9:52 a.m. UTC, <b>Hugo Pereira Da Costa</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;">ok. Ditch this. While trying not to do the replacements for dbusservice (code below), it seems that '.' are also not allowed here. The crash I get is: </p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">process 7571: arguments to dbus_message_new_method_call() were incorrect, assertion "destination == NULL || _dbus_check_is_valid_bus_name (destination)" failed in file dbus-message.c line 1266.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">For the code: 
        QString name = modInfo.handle();
        name.replace(QLatin1Char('-'), QLatin1Char('<em style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;">')); // hyphen is not allowed in dbus, only [A-Z][a-z][0-9]</em>
        name.replace(QLatin1Char('/'), QLatin1Char('<em style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;">')); // same goes for '/'
        dbusService = QLatin1String(".kde.internal.KSettingsWidget</em>") + name;</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: #408080; font-style: italic">// for the path, we also need to replace '.' characters, which are not allowed in dbus</span>
    name.replace(QLatin1Char(<span style="color: #BA2121">'.'</span>), QLatin1Char(<span style="color: #BA2121">'_'</span>));
    dbusPath <span style="color: #666666">=</span> QLatin1String(<span style="color: #BA2121">"/internal/KSettingsWidget/"</span>) <span style="color: #666666">+</span> name;
</pre></div>
</p></pre>
 </blockquote>





 <p>On January 21st, 2015, 10:22 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 what's the actual dbusService string that you're trying to register?</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">http://dbus.freedesktop.org/doc/dbus-specification.html section "Bus names" has the list of rules.</p></pre>
 </blockquote>





 <p>On January 21st, 2015, 10:31 a.m. UTC, <b>Hugo Pereira Da Costa</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;">The library path (in the .desktop file) is "X-KDE-Library=org.kde.kdecoration2/breezedecoration"
(the ork.kde.kdecoration2 subpath is a requirement from kwin)</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Right now (without patch) the current code converts this into </p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">dbusPath = /internal/KSettingsWidget/org.kde.kdecoration2_breezedecoration <- crash
dbusservice = org.kde.internal.KSettingsWidget_org.kde.kdecoration2_breezedecoration
which also crashes</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;">ok. Sorry. it seems I cannot reproduce the 'second' crash above, after a system reboot. 
I'll submit an updated patch in a sec. (reading the doc, it is true that the said dbusservice, including dots, should be valid.</p></pre>
<br />




<p>- Hugo</p>


<br />
<p>On January 20th, 2015, 11:02 a.m. UTC, Hugo Pereira Da Costa 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 Hugo Pereira Da Costa.</div>


<p style="color: grey;"><i>Updated Jan. 20, 2015, 11:02 a.m.</i></p>









<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt;">Repository: </b>
kcmutils
</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;">Also replace '.' by '_' when registering dbus path names from X_KDE_Library
Rationale:
kwin requires that configuration components for kdecoration gets installed as kcmodule in $KF5/lib/plugins/org.kde.kdecoration2</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Trying to make the said module for breeze directly loadable from kcmshell5, I hit </p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">ASSERT failure in QDBusConnection::registerObject: "Invalid object path given"</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;">yes, with code not pushed yet in breeze decoration config.
Before: crash (due to the above)
After: no crash.</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>src/kcmoduleproxy.cpp <span style="color: grey">(630217a)</span></li>

</ul>

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






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








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