[Kde-pim] fixing #42767 : attach directories to mail
Kevin Krammer
kevin.krammer at gmx.at
Wed Aug 31 11:50:32 BST 2011
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());
would result in the invocation of the QFile copy constructor which is declared
private to prevent the copying.
Hence your error message:
error: 'QFile::QFile(const QFile&)' is private
error: within this context
Laurent's modification passes the path argument directly to the QFile
constructor of object "file".
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/15035277/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