mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +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()
|
void uploadDiveShare::uploadFinishedSlot()
|
||||||
{
|
{
|
||||||
|
QByteArray html = reply->readAll();
|
||||||
reply->deleteLater();
|
reply->deleteLater();
|
||||||
timeout.stop();
|
timeout.stop();
|
||||||
if (reply->error() != 0) {
|
if (reply->error() != 0) {
|
||||||
emit uploadFinish(false, reply->errorString(), reply->readAll());
|
emit uploadFinish(false, reply->errorString(), html);
|
||||||
} else {
|
} else {
|
||||||
emit uploadFinish(true, tr("Upload successful"), reply->readAll());
|
emit uploadFinish(true, tr("Upload successful"), html);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue