mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2025-07-03 08:15:37 +00:00
QTextStream::setCodec() is gone in Qt 6.0, so use the replacement setEncoding() function
This commit is contained in:
parent
90a513dc3d
commit
ec3b000264
@ -68,7 +68,12 @@ void AutoUpdateChecker::handleUpdateCheckRequestFinished(QNetworkReply* reply)
|
|||||||
|
|
||||||
if (reply->error() == QNetworkReply::NoError) {
|
if (reply->error() == QNetworkReply::NoError) {
|
||||||
QTextStream stream(reply);
|
QTextStream stream(reply);
|
||||||
|
|
||||||
|
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
||||||
|
stream.setEncoding(QStringConverter::Utf8);
|
||||||
|
#else
|
||||||
stream.setCodec("UTF-8");
|
stream.setCodec("UTF-8");
|
||||||
|
#endif
|
||||||
|
|
||||||
// Read all data and queue the reply for deletion
|
// Read all data and queue the reply for deletion
|
||||||
QString jsonString = stream.readAll();
|
QString jsonString = stream.readAll();
|
||||||
|
@ -414,7 +414,13 @@ NvHTTP::openConnectionToString(QUrl baseUrl,
|
|||||||
QString ret;
|
QString ret;
|
||||||
|
|
||||||
QTextStream stream(reply);
|
QTextStream stream(reply);
|
||||||
|
|
||||||
|
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
||||||
|
stream.setEncoding(QStringConverter::Utf8);
|
||||||
|
#else
|
||||||
stream.setCodec("UTF-8");
|
stream.setCodec("UTF-8");
|
||||||
|
#endif
|
||||||
|
|
||||||
ret = stream.readAll();
|
ret = stream.readAll();
|
||||||
delete reply;
|
delete reply;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user