b50e584369
- 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.
32 lines
601 B
C++
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();
|
|
};
|