fix flameshot 0x0 patch
This commit is contained in:
parent
281ec88147
commit
be6f324934
2 changed files with 9 additions and 6 deletions
|
@ -33,7 +33,7 @@ index c7eadcad..a0e27094 100644
|
|||
});
|
||||
}
|
||||
diff --git a/src/tools/imgupload/storages/imgur/imguruploader.cpp b/src/tools/imgupload/storages/imgur/imguruploader.cpp
|
||||
index d6748b5a..ae80c659 100644
|
||||
index d6748b5a..7ea3bddd 100644
|
||||
--- a/src/tools/imgupload/storages/imgur/imguruploader.cpp
|
||||
+++ b/src/tools/imgupload/storages/imgur/imguruploader.cpp
|
||||
@@ -16,6 +16,8 @@
|
||||
|
@ -45,10 +45,11 @@ index d6748b5a..ae80c659 100644
|
|||
|
||||
ImgurUploader::ImgurUploader(const QPixmap& capture, QWidget* parent)
|
||||
: ImgUploaderBase(capture, parent)
|
||||
@@ -32,25 +34,8 @@ void ImgurUploader::handleReply(QNetworkReply* reply)
|
||||
@@ -31,26 +33,10 @@ void ImgurUploader::handleReply(QNetworkReply* reply)
|
||||
{
|
||||
spinner()->deleteLater();
|
||||
m_currentImageName.clear();
|
||||
if (reply->error() == QNetworkReply::NoError) {
|
||||
- if (reply->error() == QNetworkReply::NoError) {
|
||||
- QJsonDocument response = QJsonDocument::fromJson(reply->readAll());
|
||||
- QJsonObject json = response.object();
|
||||
- QJsonObject data = json[QStringLiteral("data")].toObject();
|
||||
|
@ -62,18 +63,19 @@ index d6748b5a..ae80c659 100644
|
|||
- if (lastSlash >= 0) {
|
||||
- m_currentImageName = m_currentImageName.mid(lastSlash + 1);
|
||||
- }
|
||||
-
|
||||
|
||||
- // save image to history
|
||||
- History history;
|
||||
- m_currentImageName =
|
||||
- history.packFileName("imgur", deleteToken, m_currentImageName);
|
||||
- history.save(pixmap(), m_currentImageName);
|
||||
+ if (reply->error() == QNetworkReply::NoError) {
|
||||
+ QString img_url = QString(reply->readAll().toStdString().c_str()).trimmed();
|
||||
+ setImageURL(img_url);
|
||||
|
||||
emit uploadOk(imageURL());
|
||||
} else {
|
||||
@@ -65,22 +50,18 @@ void ImgurUploader::upload()
|
||||
@@ -65,22 +51,20 @@ void ImgurUploader::upload()
|
||||
QBuffer buffer(&byteArray);
|
||||
pixmap().save(&buffer, "PNG");
|
||||
|
||||
|
@ -101,6 +103,8 @@ index d6748b5a..ae80c659 100644
|
|||
- .toUtf8());
|
||||
|
||||
- m_NetworkAM->post(request, byteArray);
|
||||
+ request.setHeader(QNetworkRequest::UserAgentHeader, QVariant("Flameshot/https://git.jacekpoz.pl/krizej/nix/src/branch/master/files/flameshot-0x0-upload.patch"));
|
||||
+
|
||||
+ m_NetworkAM->post(request, multiPart);
|
||||
}
|
||||
|
||||
|
|
1
todo.txt
1
todo.txt
|
@ -1,4 +1,3 @@
|
|||
- FIX FLAMESHOT 0X0.ST UPLOAD!!!
|
||||
- clean up modules/system.nix
|
||||
- investigate firefox config
|
||||
- all the remaining individual todos
|
||||
|
|
Loading…
Reference in a new issue