D26267: Replace deprecated QWeakPointer::data() with .toStrongRef().data()
Noah Davis
noreply at phabricator.kde.org
Sun Dec 29 22:34:49 GMT 2019
ndavis added a comment.
In D26267#584396 <https://phabricator.kde.org/D26267#584396>, @hpereiradacosta wrote:
> -1:
> if QWeakPointer::data() is obsoleted, (while needed in the code), I would object to adding toStrongRef, in between, since as pointed out by Antony, calling data immediately after brings no further security, and just results in some overhead (Weak to shared pointer). It means that either
>
> - weakPointer::data should not be obsoleted
> - the kdecoration api should be changed (to return shared pointers, or provide direct access to the data).
So this patch is not the correct thing to do at all, even if I make the changes @anthonyfieroni suggested. I doubt getting Qt to undeprecate QWeakPointer::data() is an option, so it seems like changing KDecoration would be the correct thing to do. Does that seem correct to you?
REPOSITORY
R31 Breeze
REVISION DETAIL
https://phabricator.kde.org/D26267
To: ndavis, #breeze, #plasma
Cc: hpereiradacosta, anthonyfieroni, plasma-devel, LeGast00n, The-Feren-OS-Dev, jraleigh, zachus, fbampaloukas, GB_2, ragreen, ZrenBot, ngraham, alexeymin, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, ahiemstra, mart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20191229/fecc6031/attachment-0001.html>
More information about the Plasma-devel
mailing list