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

List:       kde-frameworks-devel
Subject:    Re: Review Request 126161: OS X housekeeping
From:       David Faure <faure () kde ! org>
Date:       2016-04-10 8:31:57
Message-ID: 20160410083157.25275.42373 () mimi ! kde ! org
[Download RAW message or body]

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


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



I liked what I was seeing in this patch .... until I got to the horrible code \
duplication introduced by kinit_mac.mm. This is not the way to go. Yes #ifdefs are a \
pain, but code duplication is 1000 times worse. In Qt, the _mac.mm files only contain \
code that is mac specific.

You could move all the code that is common between mac and linux into a separate \
helper file (say kinit_common.{cpp,h}), or you could organize it this way: \
kinit.cpp/kinit.h -> shared code kinit_unix.cpp -> linux/bsd-specific
kinit_mac.mm  -> OSX specific
(and the windows guys can make a kinit_win.cpp if they need to, although I'm not sure \
they use kdeinit at all)

Code duplication is the worst enemy of maintenability, I will never accept a patch \
that duplicates lots and lots of code. But other than that, many of the changes in \
this patch seem very sensible, I will definitely approve it once the code duplication \
is gone. Thanks!


src/kdeinit/kinit_mac.mm (line 103)
<https://git.reviewboard.kde.org/r/126161/#comment64229>

    Ouch, major code duplication. Please move anything that is common between \
kinit.cpp and kinit_mac.mm into a common header (and/or .cpp file, but at least for \
the struct a header is enough).



src/kdeinit/kinit_mac.mm (line 145)
<https://git.reviewboard.kde.org/r/126161/#comment64231>

    code duplication



src/kdeinit/kinit_mac.mm (line 164)
<https://git.reviewboard.kde.org/r/126161/#comment64232>

    code duplication



src/kdeinit/kinit_mac.mm (line 210)
<https://git.reviewboard.kde.org/r/126161/#comment64233>

    If people say ifdefs are bad, surely they are not as bad as duplicating hundreds \
of lines of code, making maintenance much more difficult in the future,



src/kdeinit/kinit_mac.mm (line 289)
<https://git.reviewboard.kde.org/r/126161/#comment64234>

    I've seen this before .... ;)



src/kdeinit/kinit_mac.mm (line 312)
<https://git.reviewboard.kde.org/r/126161/#comment64235>

    duplicated -> factorize into separate .cpp/.h file



src/kdeinit/kinit_mac.mm (line 331)
<https://git.reviewboard.kde.org/r/126161/#comment64236>

    duplicated, not mac specific -> factorize



src/kdeinit/kinit_mac.mm (line 361)
<https://git.reviewboard.kde.org/r/126161/#comment64237>

    Does OOM protection actually exist on OSX?
    
    This code seems quite linux specific to me, i.e. duplicated here but never \
enabled, right? -> remove



src/kdeinit/kinit_mac.mm (line 399)
<https://git.reviewboard.kde.org/r/126161/#comment64238>

    I give up, this method is too big for me to see how much of it is duplicated from \
kinit.cpp and how much is OSX-specific.  This is a case where #ifdef might actually \
be much better...



src/kdeinit/kinit_mac.mm (line 656)
<https://git.reviewboard.kde.org/r/126161/#comment64239>

    same as the linux code?



src/kdeinit/kinit_mac.mm (line 704)
<https://git.reviewboard.kde.org/r/126161/#comment64240>

    same as the linux code?



src/kdeinit/kinit_mac.mm (line 891)
<https://git.reviewboard.kde.org/r/126161/#comment64241>

    surely that's pure duplication from kinit.cpp?



src/kdeinit/kinit_mac.mm (line 1271)
<https://git.reviewboard.kde.org/r/126161/#comment64242>

    yes, it was only used on non-mac, so remove it from here



src/klauncher/klauncher.cpp (line 376)
<https://git.reviewboard.kde.org/r/126161/#comment64243>

    Please revert, startsWith has a QLatin1String overload.



src/klauncher/klauncher.cpp (line 759)
<https://git.reviewboard.kde.org/r/126161/#comment64245>

    revert



src/klauncher/klauncher.cpp (line 823)
<https://git.reviewboard.kde.org/r/126161/#comment64244>

    revert



src/klauncher/klauncher.cpp (line 867)
<https://git.reviewboard.kde.org/r/126161/#comment64246>

    revert



src/klauncher/klauncher.cpp (line 900)
<https://git.reviewboard.kde.org/r/126161/#comment64247>

    revert



src/klauncher/klauncher.cpp (line 1074)
<https://git.reviewboard.kde.org/r/126161/#comment64248>

    revert



src/klauncher/klauncher.cpp (line 1175)
<https://git.reviewboard.kde.org/r/126161/#comment64249>

    revert, operator== has a QLatin1String overload



src/klauncher/klauncher_main.cpp (line 152)
<https://git.reviewboard.kde.org/r/126161/#comment64250>

    I'm curious, what's the difference between Q_OS_DARWIN and Q_OS_OSX?



src/wrapper.cpp (line 63)
<https://git.reviewboard.kde.org/r/126161/#comment64230>

    Does qgetenv(MAC_DISPLAY) really do anything sensible on OSX? I assume this \
doesn't exist, right?  
    It seems to me that generate_socket_name should just assemble the socket name \
differently on Mac (and Windows), no?


- David Faure


On April 6, 2016, 5:16 p.m., René J.V. Bertin wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/126161/
> -----------------------------------------------------------
> 
> (Updated April 6, 2016, 5:16 p.m.)
> 
> 
> Review request for KDE Software on Mac OS X and KDE Frameworks.
> 
> 
> Repository: kinit
> 
> 
> Description
> -------
> 
> This patch addresses several issues with the OS X adaptations:
> 
> -1 replaces the obsolete Q_OS_MAC with Q_OS_OSX
> -2 builds the relevant applications `nongui` instead of as app bundles
> -3 turns klauncher into an "agent" by setting `LSUIElement` to true \
>                 programmatically
> -4 ports a patch that has been in MacPorts' `port:kdelibs4` since October 14th \
> 2009, which prevents a kdeinit crash that is caused by calling exec after `fork()` \
> in an application that has used non-POSIX APIs and/or calling those APIs in the \
> exec'ed application. This patch (originally by MacPorts developers Jeremy Lainé \
> and Jeremy Lavergne) rearranges call order and uses a proxy application to do the \
> actual exec. 
> 
> Diffs
> -----
> 
> src/kdeinit/CMakeLists.txt ae619f7 
> src/kdeinit/kinit.cpp ca18603 
> src/kdeinit/kinit_mac.mm PRE-CREATION 
> src/klauncher/CMakeLists.txt a8e6c3e 
> src/klauncher/klauncher.h 53c0803 
> src/klauncher/klauncher.cpp baa5649 
> src/klauncher/klauncher_main.cpp 710c889 
> src/start_kdeinit/CMakeLists.txt 46d6cb3 
> src/wrapper.cpp 9cb0a71 
> 
> Diff: https://git.reviewboard.kde.org/r/126161/diff/
> 
> 
> Testing
> -------
> 
> On OS X 10.9.5 with Qt 5.5.1 and KF5rameworks 5.16.0 as well as Qt 5.6 and 5.20.0 . \
> With this patch, starting `kded5` will launch kdeinit5 and klauncher5 as expected, \
> but `kdeinit5 --kded` does not yet launch `kded5`. This is probably acceptable for \
> typical KF5 use on OS X (kded5 can be launched as a login item or as a LaunchAgent) \
> but I will have another look at why the kded isn't started. 
> I am not yet able to perform further testing; practice will for instance have to \
> show whether point 2 above needs revision (apps that need to be installed as app \
> bundles). 
> Similarly it will have to be seen whether point 3 above has any drawbacks. \
> Applications running as agents do not show up in the Dock or App Switcher. Thus, \
> klauncher will not be able to "turn itself into" an application that does have a \
> full GUI presence with my current modification. I don't know if that's supposed to \
>                 be possible though.
> NB: I have been building the KDE4 klauncher in a way that makes it impossible to \
> construct a GUI at all, so I'm not expecting issues in KF5 as long as klauncher's \
> role hasn't evolved too much. 
> 
> Thanks,
> 
> René J.V. Bertin
> 
> 


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




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





 <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">I liked what I was \
seeing in this patch .... until I got to the horrible code duplication introduced by \
kinit_mac.mm. This is not the way to go. Yes #ifdefs are a pain, but code duplication \
is 1000 times worse. In Qt, the _mac.mm files only contain code that is mac specific.

You could move all the code that is common between mac and linux into a separate \
helper file (say kinit_common.{cpp,h}), or you could organize it this way: \
kinit.cpp/kinit.h -&gt; shared code kinit_unix.cpp -&gt; linux/bsd-specific
kinit_mac.mm  -&gt; OSX specific
(and the windows guys can make a kinit_win.cpp if they need to, although I&#39;m not \
sure they use kdeinit at all)

Code duplication is the worst enemy of maintenability, I will never accept a patch \
that duplicates lots and lots of code. But other than that, many of the changes in \
this patch seem very sensible, I will definitely approve it once the code duplication \
is gone. Thanks!</pre>  <br />







<div>



<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/126161/diff/5/?file=455683#file455683line103" \
style="color: black; font-weight: bold; text-decoration: \
underline;">src/kdeinit/kinit_mac.mm</a>  <span style="font-weight: normal;">

     (Diff revision 5)

    </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">103</font></th>  <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span \
class="k">static</span> <span class="k">struct</span> <span \
class="p">{</span></pre></td>  </tr>

 </tbody>

</table>

 <div style="margin-left: 2em;">

  <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;">Ouch, \
major code duplication. Please move anything that is common between kinit.cpp and \
kinit_mac.mm into a common header (and/or .cpp file, but at least for the struct a \
header is enough).</p></pre>  </div>
</div>
<br />

<div>



<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/126161/diff/5/?file=455683#file455683line145" \
style="color: black; font-weight: bold; text-decoration: \
underline;">src/kdeinit/kinit_mac.mm</a>  <span style="font-weight: normal;">

     (Diff revision 5)

    </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">145</font></th>  <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span \
class="k">static</span> <span class="kt">void</span> <span \
class="nf">cleanup_fds</span><span class="p">()</span></pre></td>  </tr>

 </tbody>

</table>

 <div style="margin-left: 2em;">

  <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;">code \
duplication</p></pre>  </div>
</div>
<br />

<div>



<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/126161/diff/5/?file=455683#file455683line164" \
style="color: black; font-weight: bold; text-decoration: \
underline;">src/kdeinit/kinit_mac.mm</a>  <span style="font-weight: normal;">

     (Diff revision 5)

    </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">164</font></th>  <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span \
class="k">static</span> <span class="kt">void</span> <span \
class="nf">close_fds</span><span class="p">()</span></pre></td>  </tr>

 </tbody>

</table>

 <div style="margin-left: 2em;">

  <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;">code \
duplication</p></pre>  </div>
</div>
<br />

<div>



<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/126161/diff/5/?file=455683#file455683line210" \
style="color: black; font-weight: bold; text-decoration: \
underline;">src/kdeinit/kinit_mac.mm</a>  <span style="font-weight: normal;">

     (Diff revision 5)

    </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">210</font></th>  <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span \
class="k">static</span> <span class="kt">void</span> <span \
class="nf">child_died</span><span class="p">(</span><span class="kt">pid_t</span> \
<span class="n">exit_pid</span><span class="p">,</span> <span class="kt">int</span> \
<span class="n">exit_status</span><span class="p">)</span></pre></td>  </tr>

 </tbody>

</table>

 <div style="margin-left: 2em;">

  <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 \
people say ifdefs are bad, surely they are not as bad as duplicating hundreds of \
lines of code, making maintenance much more difficult in the future,</p></pre>  \
</div> </div>
<br />

<div>



<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/126161/diff/5/?file=455683#file455683line289" \
style="color: black; font-weight: bold; text-decoration: \
underline;">src/kdeinit/kinit_mac.mm</a>  <span style="font-weight: normal;">

     (Diff revision 5)

    </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">289</font></th>  <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span \
class="k">static</span> <span class="kt">void</span> <span \
class="nf">setup_tty</span><span class="p">(</span><span class="k">const</span> <span \
class="kt">char</span> <span class="o">*</span><span class="n">tty</span><span \
class="p">)</span></pre></td>  </tr>

 </tbody>

</table>

 <div style="margin-left: 2em;">

  <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;">I've \
seen this before .... ;)</p></pre>  </div>
</div>
<br />

<div>



<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/126161/diff/5/?file=455683#file455683line312" \
style="color: black; font-weight: bold; text-decoration: \
underline;">src/kdeinit/kinit_mac.mm</a>  <span style="font-weight: normal;">

     (Diff revision 5)

    </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">312</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">char</span> <span class="o">*</span><span \
class="nf">get_env_var</span><span class="p">(</span><span class="k">const</span> \
<span class="kt">char</span> <span class="o">*</span><span class="n">var</span><span \
class="p">,</span> <span class="kt">int</span> <span class="n">envc</span><span \
class="p">,</span> <span class="k">const</span> <span class="kt">char</span> <span \
class="o">*</span><span class="n">envs</span><span class="p">)</span></pre></td>  \
</tr>

 </tbody>

</table>

 <div style="margin-left: 2em;">

  <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;">duplicated -&gt; factorize into separate .cpp/.h file</p></pre>  </div>
</div>
<br />

<div>



<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/126161/diff/5/?file=455683#file455683line331" \
style="color: black; font-weight: bold; text-decoration: \
underline;">src/kdeinit/kinit_mac.mm</a>  <span style="font-weight: normal;">

     (Diff revision 5)

    </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">331</font></th>  <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span \
class="n">QByteArray</span> <span class="nf">execpath_avoid_loops</span><span \
class="p">(</span><span class="k">const</span> <span class="n">QByteArray</span> \
<span class="o">&amp;</span><span class="n">exec</span><span class="p">,</span> <span \
class="kt">int</span> <span class="n">envc</span><span class="p">,</span> <span \
class="k">const</span> <span class="kt">char</span> <span class="o">*</span><span \
class="n">envs</span><span class="p">,</span> <span class="kt">bool</span> <span \
class="n">avoid_loops</span><span class="p">)</span></pre></td>  </tr>

 </tbody>

</table>

 <div style="margin-left: 2em;">

  <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;">duplicated, not mac specific -&gt; factorize</p></pre>  </div>
</div>
<br />

<div>



<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/126161/diff/5/?file=455683#file455683line361" \
style="color: black; font-weight: bold; text-decoration: \
underline;">src/kdeinit/kinit_mac.mm</a>  <span style="font-weight: normal;">

     (Diff revision 5)

    </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">361</font></th>  <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span \
class="cp">#if KDEINIT_OOM_PROTECT</span></pre></td>  </tr>

 </tbody>

</table>

 <div style="margin-left: 2em;">

  <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;">Does \
OOM protection actually exist on OSX?</p> <p style="padding: 0;text-rendering: \
inherit;margin: 0;line-height: inherit;white-space: inherit;">This code seems quite \
linux specific to me, i.e. duplicated here but never enabled, right? -&gt; \
remove</p></pre>  </div>
</div>
<br />

<div>



<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/126161/diff/5/?file=455683#file455683line399" \
style="color: black; font-weight: bold; text-decoration: \
underline;">src/kdeinit/kinit_mac.mm</a>  <span style="font-weight: normal;">

     (Diff revision 5)

    </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">399</font></th>  <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span \
class="k">static</span> <span class="kt">pid_t</span> <span \
class="nf">launch</span><span class="p">(</span><span class="kt">int</span> <span \
class="n">argc</span><span class="p">,</span> <span class="k">const</span> <span \
class="kt">char</span> <span class="o">*</span><span class="n">_name</span><span \
class="p">,</span> <span class="k">const</span> <span class="kt">char</span> <span \
class="o">*</span><span class="n">args</span><span class="p">,</span></pre></td>  \
</tr>

 </tbody>

</table>

 <div style="margin-left: 2em;">

  <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;">I \
give up, this method is too big for me to see how much of it is duplicated from \
kinit.cpp and how much is OSX-specific. This is a case where #ifdef might actually be \
much better...</p></pre>  </div>
</div>
<br />

<div>



<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/126161/diff/5/?file=455683#file455683line656" \
style="color: black; font-weight: bold; text-decoration: \
underline;">src/kdeinit/kinit_mac.mm</a>  <span style="font-weight: normal;">

     (Diff revision 5)

    </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">656</font></th>  <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span \
class="k">static</span> <span class="kt">void</span> <span \
class="n">init_signals</span><span class="p">()</span></pre></td>  </tr>

 </tbody>

</table>

 <div style="margin-left: 2em;">

  <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;">same \
as the linux code?</p></pre>  </div>
</div>
<br />

<div>



<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/126161/diff/5/?file=455683#file455683line704" \
style="color: black; font-weight: bold; text-decoration: \
underline;">src/kdeinit/kinit_mac.mm</a>  <span style="font-weight: normal;">

     (Diff revision 5)

    </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">704</font></th>  <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span \
class="k">static</span> <span class="kt">void</span> <span \
class="n">init_kdeinit_socket</span><span class="p">()</span></pre></td>  </tr>

 </tbody>

</table>

 <div style="margin-left: 2em;">

  <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;">same \
as the linux code?</p></pre>  </div>
</div>
<br />

<div>



<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/126161/diff/5/?file=455683#file455683line891" \
style="color: black; font-weight: bold; text-decoration: \
underline;">src/kdeinit/kinit_mac.mm</a>  <span style="font-weight: normal;">

     (Diff revision 5)

    </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">891</font></th>  <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span \
class="k">static</span> <span class="kt">bool</span> <span \
class="n">handle_launcher_request</span><span class="p">(</span><span \
class="kt">int</span> <span class="n">sock</span><span class="p">,</span> <span \
class="k">const</span> <span class="kt">char</span> <span class="o">*</span><span \
class="n">who</span><span class="p">)</span></pre></td>  </tr>

 </tbody>

</table>

 <div style="margin-left: 2em;">

  <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;">surely that's pure duplication from kinit.cpp?</p></pre>  </div>
</div>
<br />

<div>



<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/126161/diff/5/?file=455683#file455683line1271" \
style="color: black; font-weight: bold; text-decoration: \
underline;">src/kdeinit/kinit_mac.mm</a>  <span style="font-weight: normal;">

     (Diff revision 5)

    </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">1271</font></th>  <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span \
class="c1">// unused??</span></pre></td>  </tr>

 </tbody>

</table>

 <div style="margin-left: 2em;">

  <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;">yes, \
it was only used on non-mac, so remove it from here</p></pre>  </div>
</div>
<br />

<div>



<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/126161/diff/5/?file=455686#file455686line376" \
style="color: black; font-weight: bold; text-decoration: \
underline;">src/klauncher/klauncher.cpp</a>  <span style="font-weight: normal;">

     (Diff revision 5)

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



 
 

 <tbody>

  <tr>
    <th bgcolor="#e9eaa8" style="border-right: 1px solid #C0C0C0;" \
align="right"><font size="2">376</font></th>  <td bgcolor="#fdfebc" width="50%"><pre \
style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span class="k">if</span> \
<span class="p">(</span><span class="n">pendingAppId</span><span \
class="p">.</span><span class="n">startsWith</span><span class="p">(</span><span \
class="n">Q<span class="hl">Latin1</span>String</span><span class="p">(</span><span \
class="s">&quot;*.&quot;</span><span class="p">)))</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">376</font></th>  <td bgcolor="#fdfebc" width="50%"><pre style="font-size: \
8pt; line-height: 140%; margin: 0; ">    <span class="k">if</span> <span \
class="p">(</span><span class="n">pendingAppId</span><span class="p">.</span><span \
class="n">startsWith</span><span class="p">(</span><span class="n">QString<span \
class="hl">Literal</span></span><span class="p">(</span><span \
class="s">&quot;*.&quot;</span><span class="p">)))</span> <span \
class="p">{</span></pre></td>  </tr>

 </tbody>

</table>

 <div style="margin-left: 2em;">

  <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;">Please revert, startsWith has a QLatin1String overload.</p></pre>  </div>
</div>
<br />

<div>



<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/126161/diff/5/?file=455686#file455686line759" \
style="color: black; font-weight: bold; text-decoration: \
underline;">src/klauncher/klauncher.cpp</a>  <span style="font-weight: normal;">

     (Diff revision 5)

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



 
 

 <tbody>

  <tr>
    <th bgcolor="#e9eaa8" style="border-right: 1px solid #C0C0C0;" \
align="right"><font size="2">759</font></th>  <td bgcolor="#fdfebc" width="50%"><pre \
style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span class="k">if</span> \
<span class="p">(</span><span class="n">request</span><span \
class="o">-&gt;</span><span class="n">name</span><span class="p">.</span><span \
class="n">endsWith</span><span class="p">(</span><span class="n">Q<span \
class="hl">Latin1</span>String</span><span class="p">(</span><span \
class="s">&quot;/kioexec&quot;</span><span class="p">)))</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">759</font></th>  <td bgcolor="#fdfebc" width="50%"><pre style="font-size: \
8pt; line-height: 140%; margin: 0; ">    <span class="k">if</span> <span \
class="p">(</span><span class="n">request</span><span class="o">-&gt;</span><span \
class="n">name</span><span class="p">.</span><span class="n">endsWith</span><span \
class="p">(</span><span class="n">QString<span class="hl">Literal</span></span><span \
class="p">(</span><span class="s">&quot;/kioexec&quot;</span><span \
class="p">)))</span> <span class="p">{</span></pre></td>  </tr>

 </tbody>

</table>

 <div style="margin-left: 2em;">

  <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;">revert</p></pre>  </div>
</div>
<br />

<div>



<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/126161/diff/5/?file=455686#file455686line823" \
style="color: black; font-weight: bold; text-decoration: \
underline;">src/klauncher/klauncher.cpp</a>  <span style="font-weight: normal;">

     (Diff revision 5)

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



 
 

 <tbody>

  <tr>
    <th bgcolor="#e9eaa8" style="border-right: 1px solid #C0C0C0;" \
align="right"><font size="2">823</font></th>  <td bgcolor="#fdfebc" width="50%"><pre \
style="font-size: 8pt; line-height: 140%; margin: 0; ">        <span \
class="k">if</span> <span class="p">(</span><span class="n">env</span><span \
class="p">.</span><span class="n">startsWith</span><span class="p">(</span><span \
class="n">Q<span class="hl">Latin1</span>String</span><span class="p">(</span><span \
class="s">&quot;DISPLAY=&quot;</span><span class="p">)))</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">823</font></th>  <td bgcolor="#fdfebc" width="50%"><pre style="font-size: \
8pt; line-height: 140%; margin: 0; ">        <span class="k">if</span> <span \
class="p">(</span><span class="n">env</span><span class="p">.</span><span \
class="n">startsWith</span><span class="p">(</span><span class="n">QString<span \
class="hl">Literal</span></span><span class="p">(</span><span \
class="s">&quot;DISPLAY=&quot;</span><span class="p">)))</span> <span \
class="p">{</span></pre></td>  </tr>

 </tbody>

</table>

 <div style="margin-left: 2em;">

  <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;">revert</p></pre>  </div>
</div>
<br />

<div>



<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/126161/diff/5/?file=455686#file455686line867" \
style="color: black; font-weight: bold; text-decoration: \
underline;">src/klauncher/klauncher.cpp</a>  <span style="font-weight: normal;">

     (Diff revision 5)

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



 
 

 <tbody>

  <tr>
    <th bgcolor="#e9eaa8" style="border-right: 1px solid #C0C0C0;" \
align="right"><font size="2">867</font></th>  <td bgcolor="#fdfebc" width="50%"><pre \
style="font-size: 8pt; line-height: 140%; margin: 0; ">            <span \
class="k">if</span> <span class="p">(</span><span class="n">env</span><span \
class="p">.</span><span class="n">startsWith</span><span class="p">(</span><span \
class="n">Q<span class="hl">Latin1</span>String</span><span class="p">(</span><span \
class="s">&quot;DISPLAY=&quot;</span><span class="p">)))</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">867</font></th>  <td bgcolor="#fdfebc" width="50%"><pre style="font-size: \
8pt; line-height: 140%; margin: 0; ">            <span class="k">if</span> <span \
class="p">(</span><span class="n">env</span><span class="p">.</span><span \
class="n">startsWith</span><span class="p">(</span><span class="n">QString<span \
class="hl">Literal</span></span><span class="p">(</span><span \
class="s">&quot;DISPLAY=&quot;</span><span class="p">)))</span> <span \
class="p">{</span></pre></td>  </tr>

 </tbody>

</table>

 <div style="margin-left: 2em;">

  <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;">revert</p></pre>  </div>
</div>
<br />

<div>



<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/126161/diff/5/?file=455686#file455686line900" \
style="color: black; font-weight: bold; text-decoration: \
underline;">src/klauncher/klauncher.cpp</a>  <span style="font-weight: normal;">

     (Diff revision 5)

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



 
 

 <tbody>

  <tr>
    <th bgcolor="#e9eaa8" style="border-right: 1px solid #C0C0C0;" \
align="right"><font size="2">900</font></th>  <td bgcolor="#fdfebc" 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">app</span><span \
class="p">.</span><span class="n">endsWith</span><span class="p">(</span><span \
class="n">Q<span class="hl">Latin1</span>String</span><span class="p">(</span><span \
class="s">&quot;kbuildsycoca5&quot;</span><span class="p">)))</span> <span \
class="p">{</span> <span class="c1">// avoid stupid loop</span></pre></td>  <th \
bgcolor="#e9eaa8" style="border-left: 1px solid #C0C0C0; border-right: 1px solid \
#C0C0C0;" align="right"><font size="2">900</font></th>  <td bgcolor="#fdfebc" \
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">app</span><span class="p">.</span><span class="n">endsWith</span><span \
class="p">(</span><span class="n">QString<span class="hl">Literal</span></span><span \
class="p">(</span><span class="s">&quot;kbuildsycoca5&quot;</span><span \
class="p">)))</span> <span class="p">{</span> <span class="c1">// avoid stupid \
loop</span></pre></td>  </tr>

 </tbody>

</table>

 <div style="margin-left: 2em;">

  <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;">revert</p></pre>  </div>
</div>
<br />

<div>



<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/126161/diff/5/?file=455686#file455686line1074" \
style="color: black; font-weight: bold; text-decoration: \
underline;">src/klauncher/klauncher.cpp</a>  <span style="font-weight: normal;">

     (Diff revision 5)

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



 
 

 <tbody>

  <tr>
    <th bgcolor="#e9eaa8" style="border-right: 1px solid #C0C0C0;" \
align="right"><font size="2">1074</font></th>  <td bgcolor="#fdfebc" width="50%"><pre \
style="font-size: 8pt; line-height: 140%; margin: 0; ">            <span \
class="n">arg_list</span><span class="p">.</span><span class="n">prepend</span><span \
class="p">(</span><span class="n">Q<span class="hl">Latin1</span>String</span><span \
class="p">(</span><span class="s">&quot;--tool=&quot;</span><span class="p">)</span> \
<span class="o">+</span> <span class="n">mSlaveValgrindSkin</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">1074</font></th>  <td bgcolor="#fdfebc" width="50%"><pre style="font-size: \
8pt; line-height: 140%; margin: 0; ">            <span class="n">arg_list</span><span \
class="p">.</span><span class="n">prepend</span><span class="p">(</span><span \
class="n">QString<span class="hl">Literal</span></span><span class="p">(</span><span \
class="s">&quot;--tool=&quot;</span><span class="p">)</span> <span class="o">+</span> \
<span class="n">mSlaveValgrindSkin</span><span class="p">);</span></pre></td>  </tr>

 </tbody>

</table>

 <div style="margin-left: 2em;">

  <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;">revert</p></pre>  </div>
</div>
<br />

<div>



<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/126161/diff/5/?file=455686#file455686line1175" \
style="color: black; font-weight: bold; text-decoration: \
underline;">src/klauncher/klauncher.cpp</a>  <span style="font-weight: normal;">

     (Diff revision 5)

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



 
 

 <tbody>

  <tr>
    <th bgcolor="#e9eaa8" style="border-right: 1px solid #C0C0C0;" \
align="right"><font size="2">1175</font></th>  <td bgcolor="#fdfebc" width="50%"><pre \
style="font-size: 8pt; line-height: 140%; margin: 0; ">        <span \
class="k">if</span> <span class="p">((</span><span class="n">slave</span><span \
class="o">-&gt;</span><span class="n">protocol</span><span class="p">()</span> <span \
class="o">==</span> <span class="n">Q<span class="hl">Latin1</span>String</span><span \
class="p">(</span><span class="s">&quot;file&quot;</span><span class="p">))</span> \
<span class="o">&amp;&amp;</span> <span class="p">(</span><span \
class="n">keepOneFileSlave</span><span class="p">))</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">1175</font></th>  <td bgcolor="#fdfebc" width="50%"><pre style="font-size: \
8pt; line-height: 140%; margin: 0; ">        <span class="k">if</span> <span \
class="p">((</span><span class="n">slave</span><span class="o">-&gt;</span><span \
class="n">protocol</span><span class="p">()</span> <span class="o">==</span> <span \
class="n">QString<span class="hl">Literal</span></span><span class="p">(</span><span \
class="s">&quot;file&quot;</span><span class="p">))</span> <span \
class="o">&amp;&amp;</span> <span class="p">(</span><span \
class="n">keepOneFileSlave</span><span class="p">))</span> <span \
class="p">{</span></pre></td>  </tr>

 </tbody>

</table>

 <div style="margin-left: 2em;">

  <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;">revert, operator== has a QLatin1String overload</p></pre>  </div>
</div>
<br />

<div>



<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/126161/diff/5/?file=455687#file455687line152" \
style="color: black; font-weight: bold; text-decoration: \
underline;">src/klauncher/klauncher_main.cpp</a>  <span style="font-weight: normal;">

     (Diff revision 5)

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



 
 

 <tbody>

  <tr>
    <th bgcolor="#e9eaa8" style="border-right: 1px solid #C0C0C0;" \
align="right"><font size="2">148</font></th>  <td bgcolor="#fdfebc" width="50%"><pre \
style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="cp">#if \
defined(Q_OS_DARWIN) || defined (Q_OS_<span class="hl">MAC</span>)</span></pre></td>  \
<th bgcolor="#e9eaa8" style="border-left: 1px solid #C0C0C0; border-right: 1px solid \
#C0C0C0;" align="right"><font size="2">152</font></th>  <td bgcolor="#fdfebc" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span \
class="cp">#if defined(Q_OS_DARWIN) || defined (Q_OS_<span \
class="hl">OSX</span>)</span></pre></td>  </tr>

 </tbody>

</table>

 <div style="margin-left: 2em;">

  <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;">I'm \
curious, what's the difference between Q_OS_DARWIN and Q_OS_OSX?</p></pre>  </div>
</div>
<br />

<div>



<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/126161/diff/5/?file=455689#file455689line63" \
style="color: black; font-weight: bold; text-decoration: \
underline;">src/wrapper.cpp</a>  <span style="font-weight: normal;">

     (Diff revision 5)

    </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">63</font></th>  <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span \
class="n">QByteArray</span> <span class="n">display</span> <span class="o">=</span> \
<span class="n">qgetenv</span><span class="p">(</span><span \
class="n">displayEnvVarName_c</span><span class="p">());</span></pre></td>  </tr>

 </tbody>

</table>

 <div style="margin-left: 2em;">

  <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;">Does \
qgetenv(MAC_DISPLAY) really do anything sensible on OSX? I assume this doesn't exist, \
right?</p> <p style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">It seems to me that generate_socket_name should just \
assemble the socket name differently on Mac (and Windows), no?</p></pre>  </div>
</div>
<br />



<p>- David Faure</p>


<br />
<p>On April 6th, 2016, 5:16 p.m. UTC, René J.V. Bertin 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 Software on Mac OS X and KDE Frameworks.</div>
<div>By René J.V. Bertin.</div>


<p style="color: grey;"><i>Updated April 6, 2016, 5:16 p.m.</i></p>









<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt;">Repository: </b>
kinit
</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;">This patch addresses several issues with the OS X \
adaptations:</p> <p style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
                inherit;white-space: inherit;">-1 replaces the obsolete Q_OS_MAC with \
                Q_OS_OSX
-2 builds the relevant applications <code style="text-rendering: inherit;color: \
#4444cc;padding: 0;white-space: normal;margin: 0;line-height: inherit;">nongui</code> \
                instead of as app bundles
-3 turns klauncher into an "agent" by setting <code style="text-rendering: \
inherit;color: #4444cc;padding: 0;white-space: normal;margin: 0;line-height: \
                inherit;">LSUIElement</code> to true programmatically
-4 ports a patch that has been in MacPorts' <code style="text-rendering: \
inherit;color: #4444cc;padding: 0;white-space: normal;margin: 0;line-height: \
inherit;">port:kdelibs4</code> since October 14th 2009, which prevents a kdeinit \
crash that is caused by calling exec after <code style="text-rendering: \
inherit;color: #4444cc;padding: 0;white-space: normal;margin: 0;line-height: \
inherit;">fork()</code> in an application that has used non-POSIX APIs and/or calling \
those APIs in the exec'ed application. This patch (originally by MacPorts developers \
Jeremy Lainé and Jeremy Lavergne) rearranges call order and uses a proxy application \
to do the actual exec.</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;">On OS X 10.9.5 with Qt 5.5.1 and KF5rameworks 5.16.0 \
as well as Qt 5.6 and 5.20.0 . With this patch, starting <code style="text-rendering: \
inherit;color: #4444cc;padding: 0;white-space: normal;margin: 0;line-height: \
inherit;">kded5</code> will launch kdeinit5 and klauncher5 as expected, but <code \
style="text-rendering: inherit;color: #4444cc;padding: 0;white-space: normal;margin: \
0;line-height: inherit;">kdeinit5 --kded</code> does not yet launch <code \
style="text-rendering: inherit;color: #4444cc;padding: 0;white-space: normal;margin: \
0;line-height: inherit;">kded5</code>. This is probably acceptable for typical KF5 \
use on OS X (kded5 can be launched as a login item or as a LaunchAgent) but I will \
have another look at why the  kded isn't started.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">I am not yet able to perform further testing; practice \
will for instance have to show whether point 2 above needs revision (apps that need \
to be installed as app bundles).</p> <p style="padding: 0;text-rendering: \
inherit;margin: 0;line-height: inherit;white-space: inherit;">Similarly it will have \
to be seen whether point 3 above has any drawbacks. Applications running as agents do \
not show up in the Dock or App Switcher. Thus, klauncher will not be able to "turn \
itself into" an application that does have a full GUI presence with my current \
                modification. I don't know if that's supposed to be possible though.
NB: I have been building the KDE4 klauncher in a way that makes it impossible to \
construct a GUI at all, so I'm not expecting issues in KF5 as long as klauncher's \
role hasn't evolved too much.</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/kdeinit/CMakeLists.txt <span style="color: grey">(ae619f7)</span></li>

 <li>src/kdeinit/kinit.cpp <span style="color: grey">(ca18603)</span></li>

 <li>src/kdeinit/kinit_mac.mm <span style="color: grey">(PRE-CREATION)</span></li>

 <li>src/klauncher/CMakeLists.txt <span style="color: grey">(a8e6c3e)</span></li>

 <li>src/klauncher/klauncher.h <span style="color: grey">(53c0803)</span></li>

 <li>src/klauncher/klauncher.cpp <span style="color: grey">(baa5649)</span></li>

 <li>src/klauncher/klauncher_main.cpp <span style="color: grey">(710c889)</span></li>

 <li>src/start_kdeinit/CMakeLists.txt <span style="color: grey">(46d6cb3)</span></li>

 <li>src/wrapper.cpp <span style="color: grey">(9cb0a71)</span></li>

</ul>

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






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







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


--===============2681351965511563627==--


[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