aboutsummaryrefslogtreecommitdiff
path: root/launcher/net
diff options
context:
space:
mode:
Diffstat (limited to 'launcher/net')
-rw-r--r--launcher/net/MetaCacheSink.cpp1
-rw-r--r--launcher/net/NetAction.h4
-rw-r--r--launcher/net/NetJob.cpp5
-rw-r--r--launcher/net/PasteUpload.cpp2
4 files changed, 5 insertions, 7 deletions
diff --git a/launcher/net/MetaCacheSink.cpp b/launcher/net/MetaCacheSink.cpp
index 5ae53c1c..c730fdbf 100644
--- a/launcher/net/MetaCacheSink.cpp
+++ b/launcher/net/MetaCacheSink.cpp
@@ -36,6 +36,7 @@
#include "MetaCacheSink.h"
#include <QFile>
#include <QFileInfo>
+#include <QRegularExpression>
#include "Application.h"
namespace Net {
diff --git a/launcher/net/NetAction.h b/launcher/net/NetAction.h
index d9c4fadc..38fe058b 100644
--- a/launcher/net/NetAction.h
+++ b/launcher/net/NetAction.h
@@ -52,7 +52,6 @@ class NetAction : public Task {
virtual ~NetAction() = default;
QUrl url() { return m_url; }
- auto index() -> int { return m_index_within_job; }
void setNetwork(shared_qobject_ptr<QNetworkAccessManager> network) { m_network = network; }
@@ -75,9 +74,6 @@ class NetAction : public Task {
public:
shared_qobject_ptr<QNetworkAccessManager> m_network;
- /// index within the parent job, FIXME: nuke
- int m_index_within_job = 0;
-
/// the network reply
unique_qobject_ptr<QNetworkReply> m_reply;
diff --git a/launcher/net/NetJob.cpp b/launcher/net/NetJob.cpp
index 9b5d4f1b..4bcd40b5 100644
--- a/launcher/net/NetJob.cpp
+++ b/launcher/net/NetJob.cpp
@@ -38,11 +38,10 @@
auto NetJob::addNetAction(NetAction::Ptr action) -> bool
{
- action->m_index_within_job = m_queue.size();
- m_queue.append(action);
-
action->setNetwork(m_network);
+ addTask(action);
+
return true;
}
diff --git a/launcher/net/PasteUpload.cpp b/launcher/net/PasteUpload.cpp
index 76b86743..d9e785c5 100644
--- a/launcher/net/PasteUpload.cpp
+++ b/launcher/net/PasteUpload.cpp
@@ -41,9 +41,11 @@
#include <QDebug>
#include <QJsonObject>
+#include <QHttpPart>
#include <QJsonArray>
#include <QJsonDocument>
#include <QFile>
+#include <QUrlQuery>
std::array<PasteUpload::PasteTypeInfo, 4> PasteUpload::PasteTypes = {
{{"0x0.st", "https://0x0.st", ""},