CompositeUploadJob: don't start job if device is disconnected
If Qt::QueuedConnection, it's possible for a device to disconnect during the waiting period, so make sure subjobs are not started after the device is disconnected. BUG: 466617 FIXED-IN: 23.04.3
This commit is contained in:
parent
ad13002e54
commit
2e60c28345
1 changed files with 6 additions and 1 deletions
|
@ -67,7 +67,12 @@ void CompositeUploadJob::start()
|
|||
m_running = true;
|
||||
|
||||
// Give SharePlugin some time to add subjobs
|
||||
QMetaObject::invokeMethod(this, "startNextSubJob", Qt::QueuedConnection);
|
||||
QMetaObject::invokeMethod(
|
||||
Daemon::instance()->getDevice(m_deviceId),
|
||||
[this] {
|
||||
startNextSubJob();
|
||||
},
|
||||
Qt::QueuedConnection);
|
||||
}
|
||||
|
||||
bool CompositeUploadJob::startListening()
|
||||
|
|
Loading…
Reference in a new issue