[neon/kde/knewstuff/Neon/unstable] debian/patches: remove patch in branch

Jonathan Riddell null at kde.org
Sat Oct 2 12:07:15 BST 2021


Git commit 1555a3e7c8297d64063f124de085d150a158daa2 by Jonathan Riddell.
Committed on 02/10/2021 at 11:07.
Pushed by jriddell into branch 'Neon/unstable'.

remove patch in branch

D  +0    -46   debian/patches/user-agent.diff

https://invent.kde.org/neon/kde/knewstuff/commit/1555a3e7c8297d64063f124de085d150a158daa2

diff --git a/debian/patches/user-agent.diff b/debian/patches/user-agent.diff
deleted file mode 100644
index 6aad124..0000000
--- a/debian/patches/user-agent.diff
+++ /dev/null
@@ -1,46 +0,0 @@
-diff --git a/src/core/jobs/httpworker.cpp b/src/core/jobs/httpworker.cpp
-index 4c218b080d9d83c57e82064be4b534e0744c132a..b81edd2db630cacdbcf7123847bae2da67d6ae22 100644
---- a/src/core/jobs/httpworker.cpp
-+++ b/src/core/jobs/httpworker.cpp
-@@ -7,7 +7,9 @@
- #include "httpworker.h"
- 
- #include "knewstuffcore_debug.h"
-+#include "knewstuffcore_version.h"
- 
-+#include <QCoreApplication>
- #include <QFile>
- #include <QMutex>
- #include <QMutexLocker>
-@@ -93,6 +95,15 @@ void HTTPWorker::setUrl(const QUrl &url)
-     d->source = url;
- }
- 
-+static void addUserAgent(QNetworkRequest &request)
-+{
-+    QString agentHeader = QStringLiteral("KNewStuff/%1").arg(QLatin1String(KNEWSTUFFCORE_VERSION_STRING));
-+    if (QCoreApplication::instance()) {
-+        agentHeader += QStringLiteral("-%1/%2").arg(QCoreApplication::instance()->applicationName(), QCoreApplication::instance()->applicationVersion());
-+    }
-+    request.setHeader(QNetworkRequest::UserAgentHeader, agentHeader);
-+}
-+
- void HTTPWorker::startRequest()
- {
-     if (d->reply) {
-@@ -101,6 +112,7 @@ void HTTPWorker::startRequest()
-     }
- 
-     QNetworkRequest request(d->source);
-+    addUserAgent(request);
-     d->reply = s_httpWorkerNAM->get(request);
-     connect(d->reply, &QNetworkReply::readyRead, this, &HTTPWorker::handleReadyRead);
-     connect(d->reply, &QNetworkReply::finished, this, &HTTPWorker::handleFinished);
-@@ -144,6 +156,7 @@ void HTTPWorker::handleFinished()
-                                    << d->reply->attribute(QNetworkRequest::HttpStatusCodeAttribute).toInt();
-             d->reply->deleteLater();
-             QNetworkRequest request(d->redirectUrl);
-+            addUserAgent(request);
-             d->reply = s_httpWorkerNAM->get(request);
-             connect(d->reply, &QNetworkReply::readyRead, this, &HTTPWorker::handleReadyRead);
-             connect(d->reply, &QNetworkReply::finished, this, &HTTPWorker::handleFinished);


More information about the Neon-commits mailing list