2021-08-20 05:04:32 +05:30
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <QFile>
|
|
|
|
#include <QtNetwork/QtNetwork>
|
|
|
|
#include <memory>
|
|
|
|
#include "tasks/Task.h"
|
2021-11-23 05:55:24 +05:30
|
|
|
#include "QObjectPtr.h"
|
2021-08-20 05:04:32 +05:30
|
|
|
|
|
|
|
class CapeChange : public Task
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
2021-12-04 05:48:05 +05:30
|
|
|
CapeChange(QObject *parent, QString token, QString capeId);
|
2021-08-20 05:04:32 +05:30
|
|
|
virtual ~CapeChange() {}
|
|
|
|
|
|
|
|
private:
|
|
|
|
void setCape(QString & cape);
|
|
|
|
void clearCape();
|
|
|
|
|
|
|
|
private:
|
|
|
|
QString m_capeId;
|
2021-12-04 05:48:05 +05:30
|
|
|
QString m_token;
|
2021-11-23 05:55:24 +05:30
|
|
|
shared_qobject_ptr<QNetworkReply> m_reply;
|
2021-08-20 05:04:32 +05:30
|
|
|
|
|
|
|
protected:
|
|
|
|
virtual void executeTask();
|
|
|
|
|
|
|
|
public slots:
|
|
|
|
void downloadError(QNetworkReply::NetworkError);
|
2023-04-18 06:21:34 +05:30
|
|
|
void sslErrors(const QList<QSslError>& errors);
|
2021-08-20 05:04:32 +05:30
|
|
|
void downloadFinished();
|
|
|
|
};
|
|
|
|
|