summaryrefslogtreecommitdiffstats
path: root/krebs/5pkgs/override/flameshot/flameshot_imgur_0.6.0.patch
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2022-06-21 22:56:52 +0200
committertv <tv@krebsco.de>2022-06-21 22:57:26 +0200
commit1328a34e51e0a14aae8dbfe6469cc580ee739bce (patch)
tree1194d83a1eecb6ffc7818ae174ea0eef433cf958 /krebs/5pkgs/override/flameshot/flameshot_imgur_0.6.0.patch
parent500aa05de7e34f6a60639a74017583268f9a829d (diff)
flameshot: make imgur great again
Diffstat (limited to 'krebs/5pkgs/override/flameshot/flameshot_imgur_0.6.0.patch')
-rw-r--r--krebs/5pkgs/override/flameshot/flameshot_imgur_0.6.0.patch34
1 files changed, 0 insertions, 34 deletions
diff --git a/krebs/5pkgs/override/flameshot/flameshot_imgur_0.6.0.patch b/krebs/5pkgs/override/flameshot/flameshot_imgur_0.6.0.patch
deleted file mode 100644
index 92023554a..000000000
--- a/krebs/5pkgs/override/flameshot/flameshot_imgur_0.6.0.patch
+++ /dev/null
@@ -1,34 +0,0 @@
---- a/src/tools/imgur/imguruploader.cpp
-+++ b/src/tools/imgur/imguruploader.cpp
-@@ -40,6 +40,7 @@
- #include <QTimer>
- #include <QJsonDocument>
- #include <QJsonObject>
-+#include <stdlib.h>
-
- ImgurUploader::ImgurUploader(const QPixmap &capture, QWidget *parent) :
- QWidget(parent), m_pixmap(capture)
-@@ -74,7 +75,10 @@ void ImgurUploader::handleReply(QNetworkReply *reply) {
- QJsonObject json = response.object();
- QJsonObject data = json["data"].toObject();
- m_imageURL.setUrl(data["link"].toString());
-- m_deleteImageURL.setUrl(QString("https://imgur.com/delete/%1").arg(
-+ char *deleteImageURLPattern = secure_getenv("IMGUR_DELETE_URL");
-+ if (deleteImageURLPattern == NULL)
-+ deleteImageURLPattern = "https://imgur.com/delete/%1";
-+ m_deleteImageURL.setUrl(QString(deleteImageURLPattern).arg(
- data["deletehash"].toString()));
- onUploadOk();
- } else {
-@@ -105,7 +109,10 @@ void ImgurUploader::upload() {
- QString description = FileNameHandler().parsedPattern();
- urlQuery.addQueryItem("description", description);
-
-- QUrl url("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(createImageURLPattern);
- url.setQuery(urlQuery);
- QNetworkRequest request(url);
- request.setHeader(QNetworkRequest::ContentTypeHeader,