data urls and FileCopyJob
David Faure
dfaure at klaralvdalens-datakonsult.se
Mon Sep 15 00:11:59 BST 2003
On Monday 15 September 2003 00:46, Leo Savernik wrote:
> data(outData);
> data(QByteArray());
> finished();
>
> And kio_data works synchronously, so the receiving end has no chance to do
> anything between receiving these signals.
That's the problem. The m_getJob->suspend() call in FileCopyJob::slotData
is supposed to actually suspend the get job, until the put job got the data.
It has no time to get it, in the current situation:
kwrite: DataProtocol::DataProtocol()
kwrite: kio_data::get(const KURL& url)
kwrite: kio_data::get -> sending outdata
kio (KIOJob): FileCopyJob::slotData
kio (KIOJob): data size : 5
kio_data::get -> sending end data
kio (KIOJob): FileCopyJob::slotData
kio (KIOJob): data size : 0 <<<<< this overwrites m_buffer
kio_data::get -> sending finished
kio (KIOJob): FileCopyJob this=0x823db00 ::slotResult(0x824cc38)
kio (KIOJob): FileCopyJob: m_getJob finished
kio (KIOJob): FileCopyJob::slotDataReq
kio (KIOJob): slotDataReq: returning data size 0 <<<<<<<<< m_buffer is empty
kio (KIOJob): FileCopyJob this=0x823db00 ::slotResult(0x8241270)
kio (KIOJob): FileCopyJob: m_putJob finished
Your pseudo-implementation of suspend doesn't seem to be enough.
If the dataslave isn't in another process, I think you need something like
"if suspended then register somewhere (member var) that resume() should finish the stuff".
--
David Faure -- faure at kde.org, dfaure at klaralvdalens-datakonsult.se
Qt/KDE/KOffice developer
Klarälvdalens Datakonsult AB, Platform-independent software solutions
More information about the kfm-devel
mailing list