Review Request 117680: Fix linker errors with MSVC
Nicolás Alvarez
nicolas.alvarez at gmail.com
Tue Apr 22 02:10:00 UTC 2014
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/117680/
-----------------------------------------------------------
(Updated April 22, 2014, 2:09 a.m.)
Status
------
This change has been marked as submitted.
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/6c13c833/attachment.html>
More information about the Kde-frameworks-devel
mailing list