mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-19 14:25:27 +00:00
core: divehare avoid race problem.
Do reply->readAll() before reply-deleteLater() With UI deleteLater() seems to happen after the function exist, but with QML it causes problems. Signed-off-by: Jan Iversen <jan@casacondor.com>
This commit is contained in:
parent
aefe87112a
commit
820d9bcd56
1 changed files with 3 additions and 2 deletions
|
@ -76,12 +76,13 @@ void uploadDiveShare::updateProgressSlot(qint64 current, qint64 total)
|
|||
|
||||
void uploadDiveShare::uploadFinishedSlot()
|
||||
{
|
||||
QByteArray html = reply->readAll();
|
||||
reply->deleteLater();
|
||||
timeout.stop();
|
||||
if (reply->error() != 0) {
|
||||
emit uploadFinish(false, reply->errorString(), reply->readAll());
|
||||
emit uploadFinish(false, reply->errorString(), html);
|
||||
} else {
|
||||
emit uploadFinish(true, tr("Upload successful"), reply->readAll());
|
||||
emit uploadFinish(true, tr("Upload successful"), html);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue