fix (or at least hack around) the "exec() causes double start() invocation" problem

This commit is contained in:
Aaron Seigo 2012-09-23 11:23:35 +02:00
parent 18563be2fb
commit dec5744f5f

View File

@ -44,8 +44,15 @@ void ServiceJobPrivate::preventAutoStart()
void ServiceJobPrivate::autoStart()
{
if (m_allowAutoStart) {
m_allowAutoStart = false;
if (q->isAutoDelete()) {
// by checking for isAutoDelete, we prevent autostarting when
// exec() is called or when the job owner has "taken control"
// of the job by requesting it not be autodeleted
q->start();
}
}
}
ServiceJob::ServiceJob(const QString &destination, const QString &operation,