summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrancois Andriot <francois.andriot@free.fr>2014-03-14 16:32:22 +0100
committerSlávek Banko <slavek.banko@axis.cz>2014-03-14 16:32:22 +0100
commit6f5618209f0db9bd4ef170126ac618ecc7c68763 (patch)
tree73565124ca3be07f6e27dac4e3c8a81925d2cd69
parentb3cefcf4edc472da6952d867c92692c25c3a8f49 (diff)
downloadtdelibs-6f5618209f0db9bd4ef170126ac618ecc7c68763.tar.gz
tdelibs-6f5618209f0db9bd4ef170126ac618ecc7c68763.zip
Fix stale tdeioslave spawned by kdirlister
This resolves Bug 1902
-rw-r--r--tdeio/tdeio/forwardingslavebase.cpp6
-rw-r--r--tdeio/tdeio/forwardingslavebase.h2
-rw-r--r--tdeio/tdeio/jobclasses.h2
-rw-r--r--tdeio/tdeio/kdirlister.cpp5
-rw-r--r--tdeio/tdeio/kdirlister.h4
5 files changed, 10 insertions, 9 deletions
diff --git a/tdeio/tdeio/forwardingslavebase.cpp b/tdeio/tdeio/forwardingslavebase.cpp
index a55f68249..e86aaef88 100644
--- a/tdeio/tdeio/forwardingslavebase.cpp
+++ b/tdeio/tdeio/forwardingslavebase.cpp
@@ -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);
}
diff --git a/tdeio/tdeio/forwardingslavebase.h b/tdeio/tdeio/forwardingslavebase.h
index 4d84089bf..5905fcf5e 100644
--- a/tdeio/tdeio/forwardingslavebase.h
+++ b/tdeio/tdeio/forwardingslavebase.h
@@ -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);
};
}
diff --git a/tdeio/tdeio/jobclasses.h b/tdeio/tdeio/jobclasses.h
index 75eb44e39..34efee582 100644
--- a/tdeio/tdeio/jobclasses.h
+++ b/tdeio/tdeio/jobclasses.h
@@ -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 );
diff --git a/tdeio/tdeio/kdirlister.cpp b/tdeio/tdeio/kdirlister.cpp
index bae304f74..92022c0e8 100644
--- a/tdeio/tdeio/kdirlister.cpp
+++ b/tdeio/tdeio/kdirlister.cpp
@@ -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);
diff --git a/tdeio/tdeio/kdirlister.h b/tdeio/tdeio/kdirlister.h
index 576ff8bd5..bc1acbb39 100644
--- a/tdeio/tdeio/kdirlister.h
+++ b/tdeio/tdeio/kdirlister.h
@@ -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: