Review Request: Call parent when performing assignment operator

David Edmundson kde at davidedmundson.co.uk
Wed Mar 30 14:43:21 CEST 2011



> On March 30, 2011, 9:43 a.m., Martin Klapetek wrote:
> > lib/adium-theme-content-info.cpp, line 55
> > <http://git.reviewboard.kde.org/r/100972/diff/1/?file=13399#file13399line55>
> >
> >     What actually happens to already allocated *d? Shouldn't this get deleted somewhere first? Like if(d) delete d;

No. That would be the case if I had written "d = other.d". 

What this is doing is copying the contents of other.d over the contents of this.d by deferencing them.
The pointer to this->d and other->d remain unchanged. 

I have a future patch that converts these to QSharedData which makes it a lot easier to read (and saves having to do this copy), but that change still requires this patch.


- David


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/100972/#review2235
-----------------------------------------------------------


On March 30, 2011, 8:51 a.m., David Edmundson wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/100972/
> -----------------------------------------------------------
> 
> (Updated March 30, 2011, 8:51 a.m.)
> 
> 
> Review request for Telepathy.
> 
> 
> Summary
> -------
> 
> Fixes a bug in which calls to 
> AdiumThemeMessageInfo a = someOtherMessageInfo class failed to actually copy all the information.
> 
> This appears a bug in the config window as found by Florian Reinhard: https://git.reviewboard.kde.org/r/100922/
> 
> 
> Diffs
> -----
> 
>   lib/adium-theme-content-info.cpp a5e1d6780ccf65acd70a024648955f621457eb65 
>   lib/adium-theme-status-info.cpp b2568e05a534f8d59bb82220043d9ff0dfb88aff 
> 
> Diff: http://git.reviewboard.kde.org/r/100972/diff
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> David
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/kde-telepathy/attachments/20110330/e8034d8d/attachment-0001.htm 


More information about the KDE-Telepathy mailing list