core: change uploadFinish() to include html
diveshareexport wants to show the HTML received in a positive response, so signal cannot be compatible with diveLogsDE Signed-off-by: Jan Iversen <jan@casacondor.com>
This commit is contained in:
parent
e5f3e927a7
commit
fc740f6369
@ -79,9 +79,9 @@ void uploadDiveShare::slot_uploadFinished()
|
||||
reply->deleteLater();
|
||||
timeout.stop();
|
||||
if (reply->error() != 0) {
|
||||
emit uploadFinish(false, reply->errorString());
|
||||
emit uploadFinish(false, reply->errorString(), reply->readAll());
|
||||
} else {
|
||||
emit uploadFinish(true, tr("Upload successful"));
|
||||
emit uploadFinish(true, tr("Upload successful"), reply->readAll());
|
||||
}
|
||||
}
|
||||
|
||||
@ -95,7 +95,7 @@ void uploadDiveShare::slot_uploadTimeout()
|
||||
}
|
||||
QString err(tr("dive-share.com not responding"));
|
||||
report_error(err.toUtf8());
|
||||
emit uploadFinish(false, err);
|
||||
emit uploadFinish(false, err, QByteArray());
|
||||
}
|
||||
|
||||
|
||||
@ -108,5 +108,5 @@ void uploadDiveShare::slot_uploadError(QNetworkReply::NetworkError error)
|
||||
}
|
||||
QString err(tr("network error %1").arg(error));
|
||||
report_error(err.toUtf8());
|
||||
emit uploadFinish(false, err);
|
||||
emit uploadFinish(false, err, QByteArray());
|
||||
}
|
||||
|
||||
@ -19,7 +19,7 @@ private slots:
|
||||
void slot_uploadError(QNetworkReply::NetworkError error);
|
||||
|
||||
signals:
|
||||
void uploadFinish(bool success, const QString &text);
|
||||
void uploadFinish(bool success, const QString &text, const QByteArray &html);
|
||||
void uploadProgress(qreal percentage, qreal total);
|
||||
void uploadStatus(const QString &text);
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user