Fix two QT payment server warnings

This code cleans up two warnings about deprecated functions and removes
another case of using a signed integer for a network request length.
This commit is contained in:
chromatic 2024-02-16 18:54:48 -08:00
parent 6cb6ec5202
commit 88ad916fce

View File

@ -460,7 +460,7 @@ void PaymentServer::handleURIOrFile(const QString& s)
return;
}
QByteArray temp;
temp.append(uri.queryItemValue("r"));
temp.append(uri.queryItemValue("r").toUtf8());
QString decoded = QUrl::fromPercentEncoding(temp);
QUrl fetchUrl(decoded, QUrl::StrictMode);
@ -716,7 +716,7 @@ void PaymentServer::fetchPaymentACK(CWallet* wallet, SendCoinsRecipient recipien
}
}
int length = payment.ByteSize();
quint64 length = payment.ByteSizeLong();
netRequest.setHeader(QNetworkRequest::ContentLengthHeader, length);
QByteArray serData(length, '\0');
if (payment.SerializeToArray(serData.data(), length)) {