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

List:       kde-mac
Subject:    Re: Review Request 122758: [OS X] work around missing Q_COMPILER_INITIALIZER_LISTS
From:       René J.V. Bertin <rjvbertin () gmail ! com>
Date:       2017-01-03 9:17:18
Message-ID: 20170103091718.31377.90392 () mimi ! kde ! org
[Download RAW message or body]

--===============6693469409565025218==
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/122758/
-----------------------------------------------------------

(Updated Jan. 3, 2017, 10:17 a.m.)


Status
------

This change has been discarded.


Review request for KDE Software on Mac OS X and KDevelop.


Repository: kdev-python


Description
-------

OS X lacks (full) support for compiler initialiser lists, i.e. \
Q_COMPILER_INITIALIZER_LISTS is not defined. As a result, several expressions used in \
kdev-python C++ code fail to compile.

This patch presents a workaround. I have used dynamically allocated class instances \
where an initialiser list is returned from a function, to avoid returning references \
to out-of-scope objects.

Please correct me if there are better ways, or if that means the objects have to \
deleted explicitly by the caller in order to prevent memory leaks.


Diffs
-----

  pythonlanguagesupport.cpp d8a720f 

Diff: https://git.reviewboard.kde.org/r/122758/diff/


Testing
-------

On OS X/MacPorts with KDE libs 4.14.5 and KDevelop 4.7.1 .


Thanks,

René J.V. Bertin


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



<table bgcolor="#e0e0e0" width="100%" cellpadding="12" style="border: 1px gray solid; \
border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;">  <tr>
  <td>
   <h1 style="margin: 0; padding: 0; font-size: 10pt;">This change has been \
discarded.</h1>  </td>
 </tr>
</table>
<br />


<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 KDevelop.</div>
<div>By René J.V. Bertin.</div>


<p style="color: grey;"><i>Updated Jan. 3, 2017, 10:17 a.m.</i></p>









<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt;">Repository: </b>
kdev-python
</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;">OS X lacks (full) support for compiler initialiser \
lists, i.e. Q_COMPILER_INITIALIZER_LISTS is not defined. As a result, several \
expressions used in kdev-python C++ code fail to compile.</p> <p style="padding: \
0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">This \
patch presents a workaround. I have used dynamically allocated class instances where \
an initialiser list is returned from a function, to avoid returning references to \
out-of-scope objects.</p> <p style="padding: 0;text-rendering: inherit;margin: \
0;line-height: inherit;white-space: inherit;">Please correct me if there are better \
ways, or if that means the objects have to deleted explicitly by the caller in order \
to prevent memory leaks.</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/MacPorts with KDE libs 4.14.5 and KDevelop \
4.7.1 .</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>pythonlanguagesupport.cpp <span style="color: grey">(d8a720f)</span></li>

</ul>

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






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



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


--===============6693469409565025218==--


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

Configure | About | News | Add a list | Sponsored by KoreLogic