Skip to content

Commit b563531

Browse files
committed
1 parent 470283a commit b563531

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

launcher/Application.cpp

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,21 @@
136136
#define STRINGIFY(x) #x
137137
#define TOSTRING(x) STRINGIFY(x)
138138

139+
// Patch for Qt 6.9.0
140+
// https://bugreports.qt.io/browse/QTBUG-135800
141+
#if QT_VERSION == QT_VERSION_CHECK(6, 9, 0)
142+
class QNetworkAccessManagerPatched: public QNetworkAccessManager
143+
{
144+
protected:
145+
virtual QNetworkReply *createRequest(Operation op, const QNetworkRequest &request, QIODevice *outgoingData = nullptr) override
146+
{
147+
QNetworkRequest req(request);
148+
req.setAttribute(QNetworkRequest::Http2AllowedAttribute, false);
149+
return QNetworkAccessManager::createRequest(op, req, outgoingData);
150+
}
151+
};
152+
#endif
153+
139154
static const QLatin1String liveCheckFile("live.check");
140155

141156
namespace {
@@ -698,7 +713,13 @@ Application::Application(int &argc, char **argv) : QApplication(argc, argv)
698713

699714
// initialize network access and proxy setup
700715
{
716+
// Patch for Qt 6.9.0
717+
// https://bugreports.qt.io/browse/QTBUG-135800
718+
#if QT_VERSION == QT_VERSION_CHECK(6, 9, 0)
719+
m_network = new QNetworkAccessManagerPatched();
720+
#else
701721
m_network = new QNetworkAccessManager();
722+
#endif
702723
QString proxyTypeStr = settings()->get("ProxyType").toString();
703724
QString addr = settings()->get("ProxyAddr").toString();
704725
int port = settings()->get("ProxyPort").value<qint16>();

0 commit comments

Comments
 (0)