ExtensionManager: Fix host_os field for extension service request

The used QSysInfo::productType() provides various code/distribution
names which in some cases have little to do with the "host_os" that is
expected by the extension service API.

This change involves osTypeToString to instead return plain OS names.

Change-Id: I24b8070342c1de9de9040adcf5e06be967b6a180
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
This commit is contained in:
Alessandro Portale
2024-06-30 23:13:05 +02:00
parent ee54b2cfca
commit 105be75c07

View File

@@ -408,7 +408,7 @@ void ExtensionsBrowser::fetchExtensions()
= R"({"version":"%1","host_os":"%2","host_os_version":"%3","host_architecture":"%4","page_size":200})";
const QString request = url.arg(host) + requestTemplate
.arg(QCoreApplication::applicationVersion())
.arg(QSysInfo::productType())
.arg(osTypeToString(HostOsInfo::hostOs()))
.arg(QSysInfo::productVersion())
.arg(QSysInfo::currentCpuArchitecture());
query.setRequest(QNetworkRequest(QUrl::fromUserInput(request)));