Review Request 122758: [OS X] work around missing Q_COMPILER_INITIALIZER_LISTS

René J.V. Bertin rjvbertin at gmail.com
Tue Dec 13 18:21:06 UTC 2016



> On Dec. 13, 2016, 4:27 p.m., Kevin Funk wrote:
> > Still confused about this patch... 
> > 
> > > OS X lacks (full) support for compiler initialiser lists, i.e. Q_COMPILER_INITIALIZER_LISTS is not defined
> > 
> > Where's the upstream bug report for this? Hasn't this been fixed? Did you actually retest this patch -- is it still needed?

I hadn't yet had the time to retest, only to note that the patch still applied.

It doesn't appear to be necessary anymore with my current set-up. Annoyingly I don't appear to have kept a trace of when I first figured out this patch. I do recall googling the error message I got and realising there was little to do about it.

The date on this RR and my local copy of the patchfile don't correspond, but it is very well possible that this is an issue on earlier OS X versions than 10.9, where C++11 support is incomplete. That means 10.8 and earlier, and there are still people locked in to those versions.

It wouldn't be an issue to keep this patch in MacPorts, if you prefer that.


> On Dec. 13, 2016, 4:27 p.m., Kevin Funk wrote:
> > pythonlanguagesupport.cpp, line 198
> > <https://git.reviewboard.kde.org/r/122758/diff/2/?file=487353#file487353line198>
> >
> >     Why on the heap?

At the time I was concerned about returning an object that was about to go out of scope. But I guess this would also apply to the return value when initialiser lists are available ...


- René J.V.


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


On Dec. 13, 2016, 3:44 p.m., René J.V. Bertin wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/122758/
> -----------------------------------------------------------
> 
> (Updated Dec. 13, 2016, 3:44 p.m.)
> 
> 
> 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
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20161213/951fcbea/attachment-0001.html>


More information about the KDevelop-devel mailing list