sneedmc/launcher/net/PasteUpload.h
Lenny McLennington b50e584369
PasteUpload task changed to use 0x0.st's protocol
- Modified PasteUpload task to upload the log file to 0x0.st and other
  services with the same protocol.

- Modified Paste settings UI to allow the user to select a custom paste
  URL, simplified the settings page code.
2022-01-19 08:27:26 +00:00

32 lines
601 B
C++

#pragma once
#include "tasks/Task.h"
#include <QNetworkReply>
#include <QBuffer>
#include <memory>
class PasteUpload : public Task
{
Q_OBJECT
public:
PasteUpload(QWidget *window, QString text, QString url);
virtual ~PasteUpload();
QString pasteLink()
{
return m_pasteLink;
}
protected:
virtual void executeTask();
private:
QWidget *m_window;
QString m_pasteLink;
QString m_uploadUrl;
QByteArray m_text;
std::shared_ptr<QNetworkReply> m_reply;
public
slots:
void downloadError(QNetworkReply::NetworkError);
void downloadFinished();
};