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

List:       kde-devel
Subject:    kget/konqueror/cache/kio question
From:       Rainer Wirtz <rainer.wirtz () gmx ! de>
Date:       2005-10-15 22:06:11
Message-ID: 200510160006.11554.rainer.wirtz () gmx ! de
[Download RAW message or body]

I'm trying to fix http://bugs.kde.org/show_bug.cgi?id=101956
This seems to be linked to the way the http-cache works.
For every new http-transfer, kget is first checking the cache by doing:

         copyjob = new KIO::GetFileJob(m_src, m_dest);
         copyjob->addMetaData("cache", "cacheonly");

GetFileJob() is derived from FileCopyJob()

Now, when a transfer is started (in konqueror) by "right-click->save 
link as.." or via the "show all links" window, everything works as 
expected. When the transfer is not in cache, a SIGNAL(result(KIO::Job 
*)) is emitted with an error and the transfer is queued.
When a transfer is started by left-click-> save as.. ( in the "save 
as..; open; cancel" dialog that opens) then the above lines are 
executed, but no SIGNAL(result()) is emitted, but instead a 
SIGNAL(totalSize()) and the file is downloaded as if 
addMetaData("cache", "cacheonly") had never been called.
SIGNAL(result()) is emitted only when the download is completed.

It looks as if when left-click->save as.. is used the KIO::FileCopyJob()
acts as if it has the file in cache although this is definitely not the 
case.

Is this a bug? a feature? How can I fix this without removing the  
"check for file in cache" feature altogether?

thanks for your help
Rainer
 
>> 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