PrismLauncher/launcher/minecraft/services/CapeChange.h
Sefa Eyeoglu 91ba4cf75e
chore: reformat
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
2023-08-14 18:16:53 +02:00

32 lines
652 B
C++

#pragma once
#include <QFile>
#include <QtNetwork/QtNetwork>
#include <memory>
#include "QObjectPtr.h"
#include "tasks/Task.h"
class CapeChange : public Task {
Q_OBJECT
public:
CapeChange(QObject* parent, QString token, QString capeId);
virtual ~CapeChange() {}
private:
void setCape(QString& cape);
void clearCape();
private:
QString m_capeId;
QString m_token;
shared_qobject_ptr<QNetworkReply> m_reply;
protected:
virtual void executeTask();
public slots:
void downloadError(QNetworkReply::NetworkError);
void sslErrors(const QList<QSslError>& errors);
void downloadFinished();
};