Missing deleteLater when the CleanupPollsJob aborts.
This is only a problem if the SyncEngine is kept alive a long time. Which is
usually not the case in the configuration where poll jobs are used.
(cherry picked from commit
34650248985914523f0684c597f0c366b703f8d7)
Q_ASSERT(job);
if (job->_item->_status == SyncFileItem::FatalError) {
emit aborted(job->_item->_errorString);
+ deleteLater();
return;
} else if (job->_item->_status != SyncFileItem::Success) {
qDebug() << "There was an error with file " << job->_item->_file << job->_item->_errorString;
job->_item->_status = SyncFileItem::FatalError;
job->_item->_errorString = tr("Error writing metadata to the database");
emit aborted(job->_item->_errorString);
+ deleteLater();
return;
}
}
~CleanupPollsJob();
+ /**
+ * Start the job. After the job is completed, it will emit either finished or aborted, and it
+ * will destroy itself.
+ */
void start();
signals:
void finished();