[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-devel
Subject: Re: Can't use read() in class derived from KIO::SlaveBase
From: Tomaz Canabrava <tcanabrava () kde ! org>
Date: 2012-01-16 10:17:51
Message-ID: CACk01_zBGgD1Aaos5JOia0GxB_wQ=V50bwg76TSkTcc5xS80fw () mail ! gmail ! com
[Download RAW message or body]
you need to call a function that has the same name as the class-method,
you can use ::read();
if I'm not mistaken
Blah::Blah(){
read(); <- class method read.
::read(); <- outside of the class, function read.
}
On Mon, Jan 16, 2012 at 7:33 AM, Philipp Schmidt <philschmidt@gmx.net> wrot=
e:
> Hi,
>
>
>
> while implementing the get() method of my MTP Kio-Slave I ran into the
> problem that SlaveBase implements a read() function itself, therefore the
> compiler tells me there is no candidate for read(int fd, void* buffer, int
> length)
>
>
>
> [...]/kio_mtp.cpp:160:50: error: no matching function for call to
> =91MTPSlave::read(int&, char [2048], int)=92
>
> candidate is: virtual void KIO::SlaveBase::read(KIO::filesize_t)
>
>
>
> Since the only way to sanely get the data of the file on the MTP-device f=
or
> a KIO-Slave is to get a filedescriptor and read from it (the other ways
> would be to directly copy the file: not possible since we don't know the
> target OR to have a callback function that does something with the data t=
hat
> it receives) I need to be able to call the read()-function from unistd.h.
>
>
>
> So how would I do that?
>
>
>
> Philipp
>
>
>
>>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscri=
be
>>> <<
>
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscrib=
e <<
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic