From 7efaf1e45f47b63fd585b07ced559ca529c6a6e7 Mon Sep 17 00:00:00 2001 From: tv Date: Wed, 25 Jan 2023 19:19:04 +0100 Subject: flameshot: move override to tv --- .../flameshot/flameshot_imgur_0.10.2.patch | 35 ++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 tv/5pkgs/override/flameshot/flameshot_imgur_0.10.2.patch (limited to 'tv/5pkgs/override/flameshot/flameshot_imgur_0.10.2.patch') diff --git a/tv/5pkgs/override/flameshot/flameshot_imgur_0.10.2.patch b/tv/5pkgs/override/flameshot/flameshot_imgur_0.10.2.patch new file mode 100644 index 000000000..c4c0bf38a --- /dev/null +++ b/tv/5pkgs/override/flameshot/flameshot_imgur_0.10.2.patch @@ -0,0 +1,35 @@ +--- a/src/tools/imgur/imguruploader.cpp ++++ b/src/tools/imgur/imguruploader.cpp +@@ -31,6 +31,7 @@ + #include + #include + #include ++#include + + ImgurUploader::ImgurUploader(const QPixmap& capture, QWidget* parent) + : QWidget(parent) +@@ -79,8 +80,11 @@ void ImgurUploader::handleReply(QNetworkReply* reply) + m_imageURL.setUrl(data[QStringLiteral("link")].toString()); + + auto deleteToken = data[QStringLiteral("deletehash")].toString(); ++ char *deleteImageURLPattern = secure_getenv("IMGUR_DELETE_URL"); ++ if (deleteImageURLPattern == NULL) ++ deleteImageURLPattern = "https://imgur.com/delete/%1"; + m_deleteImageURL.setUrl( +- QStringLiteral("https://imgur.com/delete/%1").arg(deleteToken)); ++ QString::fromUtf8(deleteImageURLPattern).arg(deleteToken)); + + // save history + QString imageName = m_imageURL.toString(); +@@ -133,7 +137,10 @@ void ImgurUploader::upload() + QString description = FileNameHandler().parsedPattern(); + urlQuery.addQueryItem(QStringLiteral("description"), description); + +- QUrl url(QStringLiteral("https://api.imgur.com/3/image")); ++ char *createImageURLPattern = secure_getenv("IMGUR_CREATE_URL"); ++ if (createImageURLPattern == NULL) ++ createImageURLPattern = "https://api.imgur.com/3/image"; ++ QUrl url(QString::fromUtf8(createImageURLPattern)); + url.setQuery(urlQuery); + QNetworkRequest request(url); + request.setHeader(QNetworkRequest::ContentTypeHeader, -- cgit v1.2.3