[Kde-pim] fixing #42767 : attach directories to mail

Kevin Krammer kevin.krammer at gmx.at
Wed Aug 31 18:14:12 BST 2011


On Wednesday, 2011-08-31, Martin Bednár wrote:
> Le Wednesday 31 of August 2011 12:50:32 Kevin Krammer a écrit :
> > On Wednesday, 2011-08-31, laurent Montel wrote:
> > > Le Wednesday 31 August 2011 12:04:46 Martin Bednár a écrit :
> > > > Posted on kde pastebin : http://pastebin.kde.org/116515/
> > > 
> > > I think that:
> > > - QFile file = QFile(info.path());
> > > + QFile file(info.path());
> > > 
> > > is better and will compile.
> > 
> > Just as an explanation:
> > 
> > QFile is a QObject subclass (indirect, there are some in between) and
> > QObject's cannot be copied.
> > 
> > QFile file = QFile(info.path());
> 
> Just a check to see if I understand this right :
> QFile file allocates a new empty QFile, and QFile(info.path()); creates a
> "temporary" initialized QFile that then gets copied into the allocated
> empty QFile?

Yes and this kind of copying is not possible for QObject classes.

Cheers,
Kevin

-- 
Kevin Krammer, KDE developer, xdg-utils developer
KDE user support, developer mentoring
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20110831/ff40e3de/attachment.sig>
-------------- next part --------------
_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/


More information about the kde-pim mailing list