summaryrefslogtreecommitdiffstats
path: root/src/sdk
diff options
context:
space:
mode:
authorArttu Tarkiainen <arttu.tarkiainen@qt.io>2022-04-04 15:18:27 +0300
committerArttu Tarkiainen <arttu.tarkiainen@qt.io>2022-04-21 14:24:31 +0000
commit99db65c70ab7cdc458e197440af8251cd48c8e89 (patch)
tree55fe59ac8f89f48343d430536df2eb48bb15dc1e /src/sdk
parent4b1af7d32b062f954a84616e28bb6296a28522b4 (diff)
Add option for specifying maximum concurrent unpack operations
For tracing issues with the multithreaded extraction and limiting the processor load from the installer. Task-number: QTIFW-2586 Change-Id: I5df0bf6be30b4ee5ef8470c407281e2a4318ed0c Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Katja Marttila <katja.marttila@qt.io>
Diffstat (limited to 'src/sdk')
-rw-r--r--src/sdk/sdkapp.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/sdk/sdkapp.h b/src/sdk/sdkapp.h
index 097886104..8a9423edc 100644
--- a/src/sdk/sdkapp.h
+++ b/src/sdk/sdkapp.h
@@ -344,6 +344,16 @@ public:
.isSet(CommandLineOptions::scCreateLocalRepositoryLong)
|| m_core->settings().createLocalRepository());
+ if (m_parser.isSet(CommandLineOptions::scMaxConcurrentOperationsLong)) {
+ bool isValid;
+ const int count = m_parser.value(CommandLineOptions::scMaxConcurrentOperationsLong).toInt(&isValid);
+ if (!isValid) {
+ errorMessage = QObject::tr("Invalid value for 'max-concurrent-operations'.");
+ return false;
+ }
+ QInstaller::PackageManagerCore::setMaxConcurrentOperations(count);
+ }
+
if (m_parser.isSet(CommandLineOptions::scAcceptLicensesLong))
m_core->setAutoAcceptLicenses();