From b8564b48c053eaec3bd1bad9b461980166a76867 Mon Sep 17 00:00:00 2001 From: Andreas Loth Date: Thu, 7 Sep 2023 11:35:25 +0200 Subject: [PATCH] Axivion: Propagate cancellation form future to network reply (abort it) Change-Id: Ibcad2410276dbf752f73fbc8c9091156892670ff Reviewed-by: Reviewed-by: hjk --- src/plugins/axivion/dashboard/dashboardclient.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/plugins/axivion/dashboard/dashboardclient.cpp b/src/plugins/axivion/dashboard/dashboardclient.cpp index 4956f106360..d6a091d7fc2 100644 --- a/src/plugins/axivion/dashboard/dashboardclient.cpp +++ b/src/plugins/axivion/dashboard/dashboardclient.cpp @@ -81,6 +81,7 @@ QFuture DashboardClient::fetchProjectInfo(const request.setRawHeader(QByteArrayLiteral(u8"X-Axivion-User-Agent"), ua); std::shared_ptr reply{ this->m_networkAccessManager.get(request), deleteLater }; return QtFuture::connect(reply.get(), &QNetworkReply::finished) + .onCanceled(reply.get(), [reply] { reply->abort(); }) .then(RawBodyReader(reply)) .then(QtFuture::Launch::Async, &RawBodyParser); }