Review Request 123858: Fix memory leak in drags

Milian Wolff mail at milianw.de
Wed May 20 06:19:56 UTC 2015


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


I really wonder why this is necessary. I just checked QtBase/src/corelib/widgets and it does not do this to the QDrag it creates. Maybe we should ask someone from Qt whether this is required here, or alternatively, whether it should also be done everywhere in Qt itself.


src/qmlcontrols/draganddrop/DeclarativeDragArea.cpp (line 229)
<https://git.reviewboard.kde.org/r/123858/#comment55301>

    on a related note: why is this using parent() here btw and not this? is DeclarativeDragArea not a QObject?



src/qmlcontrols/draganddrop/DeclarativeDragArea.cpp (line 312)
<https://git.reviewboard.kde.org/r/123858/#comment55302>

    if delete is OK here, then put it into a QScopedPointer


- Milian Wolff


On May 20, 2015, 12:23 a.m., David Edmundson wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/123858/
> -----------------------------------------------------------
> 
> (Updated May 20, 2015, 12:23 a.m.)
> 
> 
> Review request for KDE Frameworks.
> 
> 
> Repository: kdeclarative
> 
> 
> Description
> -------
> 
> We don't need each QDrag object to have the entire lifespan of the mousearea. it makes every drag leak not only the qdrag object, but also the associated mimedata.
> 
> 
> Diffs
> -----
> 
>   src/qmlcontrols/draganddrop/DeclarativeDragArea.cpp 3afaa62ba9ddca12faea333d3336487fb47cc19b 
> 
> Diff: https://git.reviewboard.kde.org/r/123858/diff/
> 
> 
> Testing
> -------
> 
> Draged lots of items from kickoff to the panel.
> 
> 
> Thanks,
> 
> David Edmundson
> 
>

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


More information about the Kde-frameworks-devel mailing list