aboutsummaryrefslogtreecommitdiff
path: root/launcher/minecraft/auth/steps/GetSkinStep.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'launcher/minecraft/auth/steps/GetSkinStep.cpp')
-rw-r--r--launcher/minecraft/auth/steps/GetSkinStep.cpp24
1 files changed, 11 insertions, 13 deletions
diff --git a/launcher/minecraft/auth/steps/GetSkinStep.cpp b/launcher/minecraft/auth/steps/GetSkinStep.cpp
index 3521f8dc..52087702 100644
--- a/launcher/minecraft/auth/steps/GetSkinStep.cpp
+++ b/launcher/minecraft/auth/steps/GetSkinStep.cpp
@@ -6,34 +6,32 @@
#include "minecraft/auth/AuthRequest.h"
#include "minecraft/auth/Parsers.h"
-GetSkinStep::GetSkinStep(AccountData* data) : AuthStep(data) {
-
-}
+GetSkinStep::GetSkinStep(AccountData* data) : AuthStep(data) {}
GetSkinStep::~GetSkinStep() noexcept = default;
-QString GetSkinStep::describe() {
+QString GetSkinStep::describe()
+{
return tr("Getting skin.");
}
-void GetSkinStep::perform() {
+void GetSkinStep::perform()
+{
auto url = QUrl(m_data->minecraftProfile.skin.url);
QNetworkRequest request = QNetworkRequest(url);
- AuthRequest *requestor = new AuthRequest(this);
+ AuthRequest* requestor = new AuthRequest(this);
connect(requestor, &AuthRequest::finished, this, &GetSkinStep::onRequestDone);
requestor->get(request);
}
-void GetSkinStep::rehydrate() {
+void GetSkinStep::rehydrate()
+{
// NOOP, for now.
}
-void GetSkinStep::onRequestDone(
- QNetworkReply::NetworkError error,
- QByteArray data,
- QList<QNetworkReply::RawHeaderPair> headers
-) {
- auto requestor = qobject_cast<AuthRequest *>(QObject::sender());
+void GetSkinStep::onRequestDone(QNetworkReply::NetworkError error, QByteArray data, QList<QNetworkReply::RawHeaderPair> headers)
+{
+ auto requestor = qobject_cast<AuthRequest*>(QObject::sender());
requestor->deleteLater();
if (error == QNetworkReply::NoError) {