Compare commits

...

1 commit

Author SHA1 Message Date
Fushan Wen
2e60c28345
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
2023-07-15 10:00:47 +08:00

View file

@ -67,7 +67,12 @@ void CompositeUploadJob::start()
m_running = true; m_running = true;
// Give SharePlugin some time to add subjobs // 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() bool CompositeUploadJob::startListening()