Fix stale tdeioslave spawned by kdirlister

This resolves Bug 1902
pull/16/head
Francois Andriot 11 years ago committed by Slávek Banko
parent b3cefcf4ed
commit 6f5618209f

@ -364,8 +364,8 @@ void ForwardingSlaveBase::connectTransferJob(TDEIO::TransferJob *job)
void ForwardingSlaveBase::connectLocalURLJob(TDEIO::LocalURLJob *job)
{
connectJob(job);
connect( job, TQT_SIGNAL( localURL(TDEIO::Job *, const KURL&, bool) ),
this, TQT_SLOT( slotLocalURL(TDEIO::Job *, const KURL&, bool) ) );
connect( job, TQT_SIGNAL( localURL(TDEIO::LocalURLJob *, const KURL&, bool) ),
this, TQT_SLOT( slotLocalURL(TDEIO::LocalURLJob *, const KURL&, bool) ) );
}
//////////////////////////////////////////////////////////////////////////////
@ -464,7 +464,7 @@ void ForwardingSlaveBase::slotCanResume (TDEIO::Job* /*job*/, TDEIO::filesize_t
canResume(offset);
}
void ForwardingSlaveBase::slotLocalURL(TDEIO::Job *, const KURL& url, bool)
void ForwardingSlaveBase::slotLocalURL(TDEIO::LocalURLJob *, const KURL& url, bool)
{
SlaveBase::localURL(url);
}

@ -196,7 +196,7 @@ private slots:
void slotCanResume (TDEIO::Job *job, TDEIO::filesize_t offset);
// TDEIO::LocalURLJob
void slotLocalURL(TDEIO::Job *, const KURL&, bool);
void slotLocalURL(TDEIO::LocalURLJob *, const KURL&, bool);
};
}

@ -1891,7 +1891,7 @@ namespace TDEIO {
* @param url the local url
* @param isLocal true if the returned URL is local, false if not
*/
void localURL( TDEIO::Job *job, const KURL &url, bool isLocal );
void localURL( TDEIO::LocalURLJob *job, const KURL &url, bool isLocal );
protected slots:
void slotLocalURL( const KURL &url, bool isLocal );

@ -1953,7 +1953,7 @@ bool KDirLister::openURL( const KURL& _url, bool _keep, bool _reload )
d->openURL_url[localURLJob] = _url;
d->openURL_keep[localURLJob] = _keep;
d->openURL_reload[localURLJob] = _reload;
connect(localURLJob, TQT_SIGNAL(localURL(TDEIO::Job*, const KURL&, bool)), this, TQT_SLOT(slotOpenURLGotLocalURL(TDEIO::Job*, const KURL&, bool)));
connect(localURLJob, TQT_SIGNAL(localURL(TDEIO::LocalURLJob*, const KURL&, bool)), this, TQT_SLOT(slotOpenURLGotLocalURL(TDEIO::LocalURLJob*, const KURL&, bool)));
connect(localURLJob, TQT_SIGNAL(destroyed()), this, TQT_SLOT(slotLocalURLKIODestroyed()));
}
return true;
@ -1963,13 +1963,14 @@ bool KDirLister::openURL( const KURL& _url, bool _keep, bool _reload )
}
}
void KDirLister::slotOpenURLGotLocalURL(TDEIO::Job *job, const KURL& url, bool isLocal) {
void KDirLister::slotOpenURLGotLocalURL(TDEIO::LocalURLJob *job, const KURL& url, bool isLocal) {
KURL realURL = d->openURL_url[job];
if (isLocal) {
realURL = url;
realURL.setInternalReferenceURL(d->openURL_url[job].url());
d->m_referenceURLMap[d->openURL_url[job].url()] = url.path();
}
job->slaveDone();
s_pCache->listDir( this, realURL, d->openURL_keep[job], d->openURL_reload[job] );
d->openURL_url.remove(job);
d->openURL_keep.remove(job);

@ -29,7 +29,7 @@
#include <kurl.h>
namespace TDEIO { class Job; class ListJob; }
namespace TDEIO { class Job; class LocalURLJob; class ListJob; }
/**
* The dir lister deals with the kiojob used to list and update a directory
@ -609,7 +609,7 @@ private slots:
void slotTotalSize( TDEIO::Job *, TDEIO::filesize_t );
void slotProcessedSize( TDEIO::Job *, TDEIO::filesize_t );
void slotSpeed( TDEIO::Job *, unsigned long );
void slotOpenURLGotLocalURL( TDEIO::Job *, const KURL&, bool );
void slotOpenURLGotLocalURL( TDEIO::LocalURLJob*, const KURL&, bool );
void slotLocalURLKIODestroyed( );
private:

Loading…
Cancel
Save