mirror of
https://bitbucket.org/smil3y/kdelibs.git
synced 2025-02-23 18:32:49 +00:00
kio: kill slaves from KIO::Scheduler destructor
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
047234847d
commit
6af1008bc5
1 changed files with 10 additions and 1 deletions
|
@ -61,6 +61,15 @@ Scheduler::~Scheduler()
|
|||
const int slavescount = m_slaves.size();
|
||||
if (slavescount > 0) {
|
||||
kWarning(7006) << "there are slaves" << slavescount;
|
||||
QMutableListIterator<KIO::SlaveInterface*> iter(m_slaves);
|
||||
while (iter.hasNext()) {
|
||||
KIO::SlaveInterface* slave = iter.next();
|
||||
kDebug(7006) << "killing slave" << slave->pid() << slave->protocol();
|
||||
iter.remove();
|
||||
disconnect(slave, 0, this, 0);
|
||||
slave->kill();
|
||||
slave->deref();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -190,7 +199,7 @@ void Scheduler::slotStartJob()
|
|||
m_slaves.append(slave);
|
||||
QObject::connect(
|
||||
slave, SIGNAL(slaveDied(KIO::SlaveInterface*)),
|
||||
Scheduler::self(), SLOT(slotSlaveDied(KIO::SlaveInterface*))
|
||||
this, SLOT(slotSlaveDied(KIO::SlaveInterface*))
|
||||
);
|
||||
} else {
|
||||
kDebug(7006) << "using exisitng slave" << slave->pid();
|
||||
|
|
Loading…
Add table
Reference in a new issue