mirror of
https://github.com/MultiMC/MultiMC5.git
synced 2024-12-27 03:14:49 +00:00
3c46d8a412
This makes the account system much more modular and makes it treat errors as something recoverable, unless they come directly from the MSA refresh token becoming invalid.
33 lines
587 B
C++
33 lines
587 B
C++
#pragma once
|
|
|
|
#include <QFile>
|
|
#include <QtNetwork/QtNetwork>
|
|
#include <memory>
|
|
#include "tasks/Task.h"
|
|
#include "QObjectPtr.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 downloadFinished();
|
|
};
|
|
|