Review Request 117680: Fix linker errors with MSVC

Commit Hook null at kde.org
Tue Apr 22 02:09:59 UTC 2014


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


This review has been submitted with commit 2db1ec127ee019e39eaeec0d0d0559e47edfb912 by Nicolás Alvarez to branch master.

- Commit Hook


On April 21, 2014, 6:35 p.m., Nicolás Alvarez wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/117680/
> -----------------------------------------------------------
> 
> (Updated April 21, 2014, 6:35 p.m.)
> 
> 
> Review request for KDE Frameworks.
> 
> 
> Repository: kservice
> 
> 
> Description
> -------
> 
> KSycocaEntry has its copy ctor disabled with Q_DISABLE_COPY. For some reason MSVC emits a copy ctor for KService (a subclass), which calls the copy ctor of KSycocaEntry. This compiles, because KService is a friend of KSycocaEntry, so the copy ctor is accessible despite being private. However, it fails to link because the private copy ctor is not defined anywhere. The same happens with the assignment operator.
> 
> Fixed by disabling copy on KService too, so that the compiler doesn't try to emit a copy constructor or assignment operator for it.
> 
> 
> Diffs
> -----
> 
>   src/services/kservice.h bfd6fce 
> 
> Diff: https://git.reviewboard.kde.org/r/117680/diff/
> 
> 
> Testing
> -------
> 
> Builds on Windows, MSVC2010. Still builds on gcc/Linux.
> 
> I didn't test newer MSVC versions, but I think MSVC2013 should be working even without this patch, as Q_DISABLE_COPY will use =delete instead of declaring the functions private.
> 
> 
> Thanks,
> 
> Nicolás Alvarez
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20140422/fc8c9e00/attachment-0001.html>


More information about the Kde-frameworks-devel mailing list