[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-panel-devel
Subject: Re: Review Request 124534: ksmserver: restore support for autostart scripts; migrate them from the K
From: "Martin Klapetek" <martin.klapetek () gmail ! com>
Date: 2015-07-30 23:15:57
Message-ID: 20150730231557.31864.9632 () mimi ! kde ! org
[Download RAW message or body]
--===============3407539927856603877==
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
> On July 30, 2015, 8:42 p.m., Mark Gaiser wrote:
> > ksmserver/startup.cpp, lines 504-518
> > <https://git.reviewboard.kde.org/r/124534/diff/1/?file=388761#file388761line504>
> >
> > You're mixing coding styles here. This looks different (more use of spaces) then \
> > the above chunk. Perhaps run AStyle with kf5 settings over this?
>
> David Faure wrote:
> The rest of the file doesn't follow the kf5 coding style either. This is \
> plasma-workspace, I don't know if there's a coding style in place, actually.
> This is plasma-workspace, I don't know if there's a coding style in place, \
> actually.
It should be the kf5 one preferrably, however ksmserver is an old code and most \
likely was not adjusted while ported to kf5. New code is usually preferred to come \
with the new style though.
- Martin
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/124534/#review83190
-----------------------------------------------------------
On July 30, 2015, 2:48 p.m., David Faure wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/124534/
> -----------------------------------------------------------
>
> (Updated July 30, 2015, 2:48 p.m.)
>
>
> Review request for Plasma and Vishesh Handa.
>
>
> Repository: plasma-workspace
>
>
> Description
> -------
>
> Commit f913e251fe6 removed this, due to a porting bug: both klauncher
> (XDG autostart using .desktop files) and ksmserver (kde-specific scripts)
> were ported to look at the same directory (~/.config/autostart),
> leading to double autostart. The right fix, however, is to use
> a different directory for scripts, I called it ~/.config/autostart-scripts.
>
> BUG: 338242
>
>
> Diffs
> -----
>
> ksmserver/server.h 2176aa1c9a6505773b61354dee6fd547fdf5841e
> ksmserver/startup.cpp 531e88b4257901e890f16c23761d2c0aa538d524
>
> Diff: https://git.reviewboard.kde.org/r/124534/diff/
>
>
> Testing
> -------
>
> Logged out and back in many times :)
>
> My autostart folder got copied correctly, including symlinks
>
>
> Thanks,
>
> David Faure
>
>
--===============3407539927856603877==
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/124534/">https://git.reviewboard.kde.org/r/124534/</a>
</td>
</tr>
</table>
<br />
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;"> <p style="margin-top: 0;">On July 30th, 2015, 8:42 p.m. CEST, <b>Mark \
Gaiser</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/124534/diff/1/?file=388761#file388761line504" \
style="color: black; font-weight: bold; text-decoration: \
underline;">ksmserver/startup.cpp</a> <span style="font-weight: normal;">
(Diff revision 1)
</span>
</th>
</tr>
</thead>
<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">502</font></th> <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span \
class="k">const</span> <span class="n">QStringList</span> <span \
class="n">entries</span> <span class="o">=</span> <span class="n">dir</span><span \
class="p">.</span><span class="n">entryList</span><span class="p">(</span> <span \
class="n">QDir</span><span class="o">::</span><span class="n">Files</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">503</font></th> <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span \
class="n">foreach</span> <span class="p">(</span><span class="k">const</span> <span \
class="n">QString</span> <span class="o">&</span><span class="n">file</span><span \
class="p">,</span> <span class="n">entries</span><span class="p">)</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">504</font></th> <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span \
class="c1">// Don't execute backup files</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">505</font></th> <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span \
class="k">if</span> <span class="p">(</span> <span class="o">!</span><span \
class="n">file</span><span class="p">.</span><span class="n">endsWith</span><span \
class="p">(</span> <span class="n">QLatin1Char</span><span class="p">(</span> <span \
class="sc">'~'</span> <span class="p">)</span> <span class="p">)</span> <span \
class="o">&&</span> <span class="o">!</span><span class="n">file</span><span \
class="p">.</span><span class="n">endsWith</span><span class="p">(</span> <span \
class="n">QStringLiteral</span><span class="p">(</span> <span \
class="s">".bak"</span> <span class="p">)</span> <span class="p">)</span> \
<span class="o">&&</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">506</font></th> <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> \
<span class="p">(</span> <span class="n">file</span><span class="p">[</span><span \
class="mi">0</span><span class="p">]</span> <span class="o">!=</span> <span \
class="n">QLatin1Char</span><span class="p">(</span> <span \
class="sc">'%'</span> <span class="p">)</span> <span class="o">||</span> \
<span class="o">!</span><span class="n">file</span><span class="p">.</span><span \
class="n">endsWith</span><span class="p">(</span> <span \
class="n">QLatin1Char</span><span class="p">(</span> <span \
class="sc">'%'</span> <span class="p">)</span> <span class="p">)</span> <span \
class="p">)</span> <span class="o">&&</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">507</font></th> <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> \
<span class="p">(</span> <span class="n">file</span><span class="p">[</span><span \
class="mi">0</span><span class="p">]</span> <span class="o">!=</span> <span \
class="n">QLatin1Char</span><span class="p">(</span> <span \
class="sc">'#'</span> <span class="p">)</span> <span class="o">||</span> \
<span class="o">!</span><span class="n">file</span><span class="p">.</span><span \
class="n">endsWith</span><span class="p">(</span> <span \
class="n">QLatin1Char</span><span class="p">(</span> <span \
class="sc">'#'</span> <span class="p">)</span> <span class="p">)</span> <span \
class="p">)</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">508</font></th> <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <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">509</font></th> <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> \
<span class="k">const</span> <span class="n">QString</span> <span \
class="n">fullPath</span> <span class="o">=</span> <span class="n">dir</span><span \
class="p">.</span><span class="n">absolutePath</span><span class="p">()</span> <span \
class="o">+</span> <span class="n">QLatin1Char</span><span class="p">(</span> <span \
class="sc">'/'</span> <span class="p">)</span> <span class="o">+</span> <span \
class="n">file</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">510</font></th> <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> \
<span class="k">const</span> <span class="kt">bool</span> <span \
class="n">started</span> <span class="o">=</span> <span \
class="n">QProcess</span><span class="o">::</span><span \
class="n">startDetached</span><span class="p">(</span><span \
class="n">fullPath</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">511</font></th> <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> \
<span class="k">if</span> <span class="p">(</span><span class="o">!</span><span \
class="n">started</span><span class="p">)</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">512</font></th> <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> \
<span class="n">qWarning</span><span class="p">()</span> <span \
class="o"><<</span> <span class="s">"Error starting"</span> <span \
class="o"><<</span> <span class="n">fullPath</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">513</font></th> <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> \
<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">514</font></th> <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <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">515</font></th> <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <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">516</font></th> <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><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;">You're mixing coding styles here. This looks different (more use of spaces) \
then the above chunk. Perhaps run AStyle with kf5 settings over this?</p></pre> \
</blockquote>
<p>On July 30th, 2015, 11:26 p.m. CEST, <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;">The \
rest of the file doesn't follow the kf5 coding style either. This is \
plasma-workspace, I don't know if there's a coding style in place, \
actually.</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;"><blockquote \
style="text-rendering: inherit;padding: 0 0 0 1em;border-left: 1px solid \
#bbb;white-space: normal;margin: 0 0 0 0.5em;line-height: inherit;"> <p \
style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: \
inherit;">This is plasma-workspace, I don't know if there's a coding style in place, \
actually.</p> </blockquote>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">It should be the kf5 one preferrably, however \
ksmserver is an old code and most likely was not adjusted while ported to kf5. New \
code is usually preferred to come with the new style though.</p></pre> <br />
<p>- Martin</p>
<br />
<p>On July 30th, 2015, 2:48 p.m. CEST, David Faure 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 Plasma and Vishesh Handa.</div>
<div>By David Faure.</div>
<p style="color: grey;"><i>Updated July 30, 2015, 2:48 p.m.</i></p>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt;">Repository: </b>
plasma-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;">Commit f913e251fe6 removed this, due to a porting bug: both klauncher \
(XDG autostart using .desktop files) and ksmserver (kde-specific scripts) were ported \
to look at the same directory (~/.config/autostart), leading to double autostart. The \
right fix, however, is to use a different directory for scripts, I called it \
~/.config/autostart-scripts.
BUG: 338242</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;">Logged out and back in many times :)</p> <p \
style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: \
inherit;">My autostart folder got copied correctly, including symlinks</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>ksmserver/server.h <span style="color: \
grey">(2176aa1c9a6505773b61354dee6fd547fdf5841e)</span></li>
<li>ksmserver/startup.cpp <span style="color: \
grey">(531e88b4257901e890f16c23761d2c0aa538d524)</span></li>
</ul>
<p><a href="https://git.reviewboard.kde.org/r/124534/diff/" style="margin-left: \
3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>
--===============3407539927856603877==--
[Attachment #3 (text/plain)]
_______________________________________________
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