diff options
author | lassulus <lassulus@lassul.us> | 2021-06-03 19:17:58 +0200 |
---|---|---|
committer | lassulus <lassulus@lassul.us> | 2021-06-03 19:17:58 +0200 |
commit | 86007337ddd9fd0be613ac895635807d8bfc2bd7 (patch) | |
tree | 0374b42d7a7be1a84598f87feefe1311b810e784 /krebs/5pkgs/override/flameshot/flameshot_imgur_0.9.0.patch | |
parent | c230b5ef3f0e7122bbff68735fa8e7a1a98acea6 (diff) | |
parent | c4c40afca5cd83917376804ae6e8259cbfc571d9 (diff) |
Merge remote-tracking branch 'ni/master'
Diffstat (limited to 'krebs/5pkgs/override/flameshot/flameshot_imgur_0.9.0.patch')
-rw-r--r-- | krebs/5pkgs/override/flameshot/flameshot_imgur_0.9.0.patch | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/krebs/5pkgs/override/flameshot/flameshot_imgur_0.9.0.patch b/krebs/5pkgs/override/flameshot/flameshot_imgur_0.9.0.patch new file mode 100644 index 000000000..c4c0bf38a --- /dev/null +++ b/krebs/5pkgs/override/flameshot/flameshot_imgur_0.9.0.patch @@ -0,0 +1,35 @@ +--- a/src/tools/imgur/imguruploader.cpp ++++ b/src/tools/imgur/imguruploader.cpp +@@ -31,6 +31,7 @@ + #include <QTimer> + #include <QUrlQuery> + #include <QVBoxLayout> ++#include <stdlib.h> + + 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, |