<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="https://git.reviewboard.kde.org/r/116527/">https://git.reviewboard.kde.org/r/116527/</a>
</td>
</tr>
</table>
<br />
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<p style="margin-top: 0;">On March 3rd, 2014, 1:35 p.m. CET, <b>Lukáš Tinkl</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/116527/diff/1/?file=251312#file251312line267" style="color: black; font-weight: bold; text-decoration: underline;">powerdevil/daemon/backends/upower/powerdevilupowerbackend.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 PowerDevilUPowerBackend::init()</pre></td>
</tr>
</tbody>
<tbody>
<tr>
<th bgcolor="#e9eaa8" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">257</font></th>
<td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="n">connect</span><span class="p">(</span><span class="n">m_login1Interface</span><span class="p">.</span><span class="n">data</span><span class="p">(),</span> <span class="n">SIGNAL</span><span class="p">(</span><span class="n">PrepareForSleep</span><span class="p">(</span><span class="kt">bool</span><span class="p">)),</span> <span class="k">this</span><span class="p">,</span> <span class="n">SLOT</span><span class="p">(</span><span class="n">slotLogin1Resuming</span><span class="p">(</span><span class="kt">bool</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">232</font></th>
<td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="n">QDBusReply</span><span class="o"><</span><span class="kt">bool</span><span class="o">></span> <span class="n">reply</span> <span class="o">=</span> <span class="n">m_login1Interface</span><span class="p">.</span><span class="n">data</span><span class="p">()</span><span class="o">-></span><span class="n">call</span><span class="p">(</span><span class="s">"Get"</span><span class="p">,</span> <span class="s">"org.freedesktop.login1.Manager"</span><span class="p">,</span> <span class="s">"PreparingForSleep"</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;">Why are you checking for this property? Are you sure it was introduced together with the signal below?</pre>
</blockquote>
<p>On March 3rd, 2014, 1:58 p.m. CET, <b>Timothée Ravier</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;">You're right, I should check for the signal been available instead (if I understand correctly what's written here: http://www.freedesktop.org/wiki/Software/systemd/logind/). I'll have a look as I don't know if it's possible to check for a signal availability with DBus (except using introspection).</pre>
</blockquote>
<p>On March 3rd, 2014, 11:20 p.m. CET, <b>Timothée Ravier</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;">Thiago told me on IRC (#dbus) that I should not use introspection and that they are no other way to check if a signal is available except waiting for it. I'm going to have a look in systemd to make sure that this variable was introduced at the same time as the signal.</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 asked for clarifications on the systemd mailing list: http://lists.freedesktop.org/archives/systemd-devel/2014-March/017566.html</pre>
<br />
<p>- Timothée</p>
<br />
<p>On March 2nd, 2014, 3:08 a.m. CET, Timothée Ravier wrote:</p>
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('https://git.reviewboard.kde.org/static/rb/images/review_request_box_top_bg.ab6f3b1072c9.png'); background-position: left top; background-repeat: repeat-x; border: 1px black solid;">
<tr>
<td>
<div>Review request for Solid.</div>
<div>By Timothée Ravier.</div>
<p style="color: grey;"><i>Updated March 2, 2014, 3:08 a.m.</i></p>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt;">Repository: </b>
kde-workspace
</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;">Properly check logind suspend-related interfaces by calling DBus methods, getting properties and checking for errors. This is recommended by upstream:
http://lists.freedesktop.org/archives/systemd-devel/2014-February/017403.html
http://lists.freedesktop.org/archives/systemd-devel/2014-February/017452.html
Replace logic introduced in:
https://git.reviewboard.kde.org/r/114393/
https://git.reviewboard.kde.org/r/115271/
This also removes the systemd and upstart version checks.
Note: I do not have any non-systemd system to check the other paths in the code.</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;">All tests were done running systemd 210 on Arch Linux:
* With kdebase-workspace 4.11.6-2 from official repositories, suspend is not available;
* With kdebase-workspace git branch KDE/4.11 with commit 5dc2b9a5c09d95ba9a17ac00056213082feb8d90 reverted, suspend is not available;
* With kdebase-workspace git branch KDE/4.11 with commit 5dc2b9a5c09d95ba9a17ac00056213082feb8d90, suspend is available;
* With kdebase-workspace git branch KDE/4.11 with the patch, suspend is available;</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>powerdevil/daemon/backends/upower/dbus/org.freedesktop.login1.xml <span style="color: grey">(PRE-CREATION)</span></li>
<li>powerdevil/daemon/backends/upower/dbus/com.ubuntu.Upstart.xml <span style="color: grey">(dc7ae42)</span></li>
<li>powerdevil/daemon/BackendConfig.cmake <span style="color: grey">(41c8812)</span></li>
<li>powerdevil/daemon/backends/upower/login1suspendjob.h <span style="color: grey">(e1c2ff4)</span></li>
<li>powerdevil/daemon/backends/upower/login1suspendjob.cpp <span style="color: grey">(54371c8)</span></li>
<li>powerdevil/daemon/backends/upower/powerdevilupowerbackend.h <span style="color: grey">(c6563b0)</span></li>
<li>powerdevil/daemon/backends/upower/powerdevilupowerbackend.cpp <span style="color: grey">(94b20f1)</span></li>
</ul>
<p><a href="https://git.reviewboard.kde.org/r/116527/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>