[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: KIO::get leads to Segmentation Fault
From:       David Faure <faure () kde ! org>
Date:       2005-04-18 8:39:31
Message-ID: 200504181039.32112.faure () kde ! org
[Download RAW message or body]

On Monday 18 April 2005 10:25, Stefan Walkner wrote:
> void MyClass::myMethod()
> {
>     KIO::TransferJob *job = KIO::get(KURL(myurl), false, true);
>     
>     connect(job, SIGNAL(result(KIO::Job *)), this, 
> SLOT(receivedResult(KIO::Job *)));
>     connect(job, SIGNAL(data(KIO::Job *, const QByteArray &)), this, 
> SLOT(receiveData(KIO::Job *, const QByteArray &)));
> 
>     KIO::Scheduler::doJob(job); //also scheduleJob does not work
You don't need to call either doJob nor scheduleJob. Just create the job, the rest happens atomatically.

> -------------CODE---------------
> but -> I don't get informed about the result/data signals.
receivedResult is never called?? I can't see why this would be the case.
You don't delete the "myclass" instance before the job finishes, right?

-- 
David Faure, faure@kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).
 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic