Review Request 119241: Fix QExplicitlySharedDataPointer usage
Kevin Funk
kfunk at kde.org
Sat Jul 12 14:21:09 UTC 2014
> On July 12, 2014, 2:01 p.m., Aleix Pol Gonzalez wrote:
> > tests/ksycocatest.cpp, line 104
> > <https://git.reviewboard.kde.org/r/119241/diff/1/?file=289736#file289736line104>
> >
> > Why does it need a static_cast if we're upcasting?
> > Also constructing a shared pointer from the data field in another one seems dangerous...
That' a downcast. The hierarchy is KService : KSycocaEntry : QSharedData.
Also, construcing it from the data field isn't dangerous -- because the ref-counter is inside the tracked object (QSharedData).
Note that QExplicitlySharedDataPointer is missing convenience API like we had in KSharedPtr, e.g. KSharedPtr::staticCast.
- Kevin
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/119241/#review62182
-----------------------------------------------------------
On July 12, 2014, 9:41 a.m., Kevin Funk wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/119241/
> -----------------------------------------------------------
>
> (Updated July 12, 2014, 9:41 a.m.)
>
>
> Review request for KDE Frameworks.
>
>
> Repository: kservice
>
>
> Description
> -------
>
> Fix QExplicitlySharedDataPointer usage
>
> One of the constructors of QExplicitlySharedDataPointer got disabled in
> Qt 5.4 due to being to permissive.
>
> Also see:
> http://kfunk.org/2014/07/10/wrap-up-issues-with-qexplicitlyshareddatapointer-ksharedptr-successor/
>
>
> Diffs
> -----
>
> src/kbuildsycoca/kbuildservicefactory.cpp bc36a22ced38892a92656d37a5d63e768dec6d40
> src/kbuildsycoca/kbuildservicegroupfactory.cpp ea0d6ed094347c4bb3f0ce2bfd9a26445a25c545
> src/kbuildsycoca/kbuildservicetypefactory.cpp 8f577a4267e8818e7e2cf5109068659439ca3221
> src/kbuildsycoca/kbuildsycoca.cpp ed2929f4e60a1841807ce8490c8057d5a7b55827
> src/services/kmimetypefactory.cpp a52d07d1dd9040c0a79f36f1665822e714d9b369
> src/services/kservicefactory.cpp bb1e0f58396a358c3168c74a89be04315a295fcd
> src/services/kservicegroup.cpp 0bda1340ae0356c3d5aca9a9f0b3dd5e905638d8
> src/services/kservicetypefactory.cpp 7599c4c73220b2aca366f41ac5cd7d05abfa8afc
> src/sycoca/ksycocadict.cpp a584f933bff10f44bc257ab996aaee3ad38cc79c
> tests/ksycocatest.cpp d51d80a691427fa4295dd06802de2fb87112f0ff
>
> Diff: https://git.reviewboard.kde.org/r/119241/diff/
>
>
> Testing
> -------
>
>
> Thanks,
>
> Kevin Funk
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20140712/b69e6619/attachment.html>
More information about the Kde-frameworks-devel
mailing list