aboutsummaryrefslogtreecommitdiff
path: root/launcher/screenshots/ImgurUpload.cpp
diff options
context:
space:
mode:
authorRyan Cao <70191398+ryanccn@users.noreply.github.com>2022-06-04 15:33:17 +0800
committerRyan Cao <70191398+ryanccn@users.noreply.github.com>2022-06-04 15:33:17 +0800
commit25ab121e42f624352bb4f32faa29e9e455328f09 (patch)
treedc9e1ff5a800196f4072a8fa019cf615e721b3ab /launcher/screenshots/ImgurUpload.cpp
parent04a3669fc470130a5d7f2dfd32f06a3f2aceb165 (diff)
downloadPrismLauncher-25ab121e42f624352bb4f32faa29e9e455328f09.tar.gz
PrismLauncher-25ab121e42f624352bb4f32faa29e9e455328f09.tar.bz2
PrismLauncher-25ab121e42f624352bb4f32faa29e9e455328f09.zip
feat: custom user-agent
Diffstat (limited to 'launcher/screenshots/ImgurUpload.cpp')
-rw-r--r--launcher/screenshots/ImgurUpload.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/launcher/screenshots/ImgurUpload.cpp b/launcher/screenshots/ImgurUpload.cpp
index fbcfb95f..9aeb6fb8 100644
--- a/launcher/screenshots/ImgurUpload.cpp
+++ b/launcher/screenshots/ImgurUpload.cpp
@@ -35,6 +35,7 @@
#include "ImgurUpload.h"
#include "BuildConfig.h"
+#include "Application.h"
#include <QNetworkRequest>
#include <QHttpMultiPart>
@@ -56,7 +57,7 @@ void ImgurUpload::executeTask()
finished = false;
m_state = Task::State::Running;
QNetworkRequest request(m_url);
- request.setHeader(QNetworkRequest::UserAgentHeader, BuildConfig.USER_AGENT_UNCACHED);
+ request.setHeader(QNetworkRequest::UserAgentHeader, APPLICATION->getUserAgentUncached().toUtf8());
request.setRawHeader("Authorization", QString("Client-ID %1").arg(BuildConfig.IMGUR_CLIENT_ID).toStdString().c_str());
request.setRawHeader("Accept", "application/json");