diff options
author | Petr Mrázek <peterix@gmail.com> | 2021-11-17 13:20:10 +0100 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2021-11-17 13:20:50 +0100 |
commit | eafeb64decf9fa3b4ae9617abc777698e51b24d0 (patch) | |
tree | 0c6ec881313803e793e5850fb420b6254e432ba8 /launcher/minecraft/auth/flows | |
parent | 0022aed8bb03c21ca6828092f7f4c5655699f9a9 (diff) | |
download | PrismLauncher-eafeb64decf9fa3b4ae9617abc777698e51b24d0.tar.gz PrismLauncher-eafeb64decf9fa3b4ae9617abc777698e51b24d0.tar.bz2 PrismLauncher-eafeb64decf9fa3b4ae9617abc777698e51b24d0.zip |
NOISSUE qnam -> network
Diffstat (limited to 'launcher/minecraft/auth/flows')
-rw-r--r-- | launcher/minecraft/auth/flows/AuthContext.cpp | 2 | ||||
-rw-r--r-- | launcher/minecraft/auth/flows/AuthRequest.cpp | 4 | ||||
-rw-r--r-- | launcher/minecraft/auth/flows/Yggdrasil.cpp | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/launcher/minecraft/auth/flows/AuthContext.cpp b/launcher/minecraft/auth/flows/AuthContext.cpp index 349fda4b..39f14b26 100644 --- a/launcher/minecraft/auth/flows/AuthContext.cpp +++ b/launcher/minecraft/auth/flows/AuthContext.cpp @@ -70,7 +70,7 @@ void AuthContext::initMSA() { opts.accessTokenUrl = "https://login.microsoftonline.com/consumers/oauth2/v2.0/token"; opts.listenerPorts = {28562, 28563, 28564, 28565, 28566}; - m_oauth2 = new OAuth2(opts, m_data->msaToken, this, &ENV.qnam()); + m_oauth2 = new OAuth2(opts, m_data->msaToken, this, &ENV.network()); m_oauth2->setGrantFlow(Katabasis::OAuth2::GrantFlowDevice); connect(m_oauth2, &OAuth2::linkingFailed, this, &AuthContext::onOAuthLinkingFailed); diff --git a/launcher/minecraft/auth/flows/AuthRequest.cpp b/launcher/minecraft/auth/flows/AuthRequest.cpp index 4b3aaa29..513c4c08 100644 --- a/launcher/minecraft/auth/flows/AuthRequest.cpp +++ b/launcher/minecraft/auth/flows/AuthRequest.cpp @@ -17,7 +17,7 @@ AuthRequest::~AuthRequest() { void AuthRequest::get(const QNetworkRequest &req, int timeout/* = 60*1000*/) { setup(req, QNetworkAccessManager::GetOperation); - reply_ = ENV.qnam().get(request_); + reply_ = ENV.network().get(request_); status_ = Requesting; timedReplies_.add(new Katabasis::Reply(reply_, timeout)); connect(reply_, SIGNAL(error(QNetworkReply::NetworkError)), this, SLOT(onRequestError(QNetworkReply::NetworkError))); @@ -29,7 +29,7 @@ void AuthRequest::post(const QNetworkRequest &req, const QByteArray &data, int t setup(req, QNetworkAccessManager::PostOperation); data_ = data; status_ = Requesting; - reply_ = ENV.qnam().post(request_, data_); + reply_ = ENV.network().post(request_, data_); timedReplies_.add(new Katabasis::Reply(reply_, timeout)); connect(reply_, SIGNAL(error(QNetworkReply::NetworkError)), this, SLOT(onRequestError(QNetworkReply::NetworkError))); connect(reply_, SIGNAL(finished()), this, SLOT(onRequestFinished())); diff --git a/launcher/minecraft/auth/flows/Yggdrasil.cpp b/launcher/minecraft/auth/flows/Yggdrasil.cpp index 20ca63d0..4f94e91f 100644 --- a/launcher/minecraft/auth/flows/Yggdrasil.cpp +++ b/launcher/minecraft/auth/flows/Yggdrasil.cpp @@ -40,7 +40,7 @@ void Yggdrasil::sendRequest(QUrl endpoint, QByteArray content) { QNetworkRequest netRequest(endpoint); netRequest.setHeader(QNetworkRequest::ContentTypeHeader, "application/json"); - m_netReply = ENV.qnam().post(netRequest, content); + m_netReply = ENV.network().post(netRequest, content); connect(m_netReply, &QNetworkReply::finished, this, &Yggdrasil::processReply); connect(m_netReply, &QNetworkReply::uploadProgress, this, &Yggdrasil::refreshTimers); connect(m_netReply, &QNetworkReply::downloadProgress, this, &Yggdrasil::refreshTimers); |