mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Qt6: update the connect calls for QNetworkReply
Because of the old connect syntax used the incorrect signal names weren't caught at compile time. To switch to the new syntax we had to make two functions pure virtual in the WebServices class - let's hope I got that right. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
e9b4d02d24
commit
c41e2489a4
5 changed files with 34 additions and 4 deletions
|
@ -255,13 +255,20 @@ void uploadDiveLogsDE::uploadDives(const QString &filename, const QString &useri
|
|||
reply = manager()->post(request, multipart);
|
||||
|
||||
// connect signals from upload process
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
||||
connect(reply, &QNetworkReply::finished, this, &uploadDiveLogsDE::uploadFinishedSlot);
|
||||
connect(reply, &QNetworkReply::errorOccurred, this, &uploadDiveLogsDE::uploadErrorSlot);
|
||||
connect(reply, &QNetworkReply::uploadProgress, this, &uploadDiveLogsDE::updateProgressSlot);
|
||||
connect(&timeout, &QTimer::timeout, this, &uploadDiveLogsDE::uploadTimeoutSlot);
|
||||
#else
|
||||
|
||||
connect(reply, SIGNAL(finished()), this, SLOT(uploadFinishedSlot()));
|
||||
connect(reply, SIGNAL(error(QNetworkReply::NetworkError)), this,
|
||||
SLOT(uploadErrorSlot(QNetworkReply::NetworkError)));
|
||||
connect(reply, SIGNAL(uploadProgress(qint64, qint64)), this,
|
||||
SLOT(updateProgressSlot(qint64, qint64)));
|
||||
connect(&timeout, SIGNAL(timeout()), this, SLOT(uploadTimeoutSlot()));
|
||||
|
||||
#endif
|
||||
timeout.start(30000); // 30s
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue