Fix build with Qt 5.15
This commit is contained in:
parent
979de190dc
commit
10dae7482c
5 changed files with 22 additions and 9 deletions
|
|
@ -1,4 +1,5 @@
|
|||
#include "nvhttp.h"
|
||||
#include "utils.h"
|
||||
#include <Limelight.h>
|
||||
|
||||
#include <QDebug>
|
||||
|
|
@ -488,26 +489,26 @@ NvHTTP::openConnection(QUrl baseUrl,
|
|||
m_Nam.clearAccessCache();
|
||||
|
||||
// Handle error
|
||||
if (reply->error() != QNetworkReply::NoError)
|
||||
if (QNETREPLY_GET_ERROR(reply) != QNetworkReply::NoError)
|
||||
{
|
||||
if (logLevel >= NvLogLevel::NVLL_ERROR) {
|
||||
qWarning() << command << " request failed with error " << reply->error();
|
||||
qWarning() << command << " request failed with error " << QNETREPLY_GET_ERROR(reply);
|
||||
}
|
||||
|
||||
if (reply->error() == QNetworkReply::SslHandshakeFailedError) {
|
||||
if (QNETREPLY_GET_ERROR(reply) == QNetworkReply::SslHandshakeFailedError) {
|
||||
// This will trigger falling back to HTTP for the serverinfo query
|
||||
// then pairing again to get the updated certificate.
|
||||
GfeHttpResponseException exception(401, "Server certificate mismatch");
|
||||
delete reply;
|
||||
throw exception;
|
||||
}
|
||||
else if (reply->error() == QNetworkReply::OperationCanceledError) {
|
||||
else if (QNETREPLY_GET_ERROR(reply) == QNetworkReply::OperationCanceledError) {
|
||||
QtNetworkReplyException exception(QNetworkReply::TimeoutError, "Request timed out");
|
||||
delete reply;
|
||||
throw exception;
|
||||
}
|
||||
else {
|
||||
QtNetworkReplyException exception(reply->error(), reply->errorString());
|
||||
QtNetworkReplyException exception(QNETREPLY_GET_ERROR(reply), reply->errorString());
|
||||
delete reply;
|
||||
throw exception;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue