summaryrefslogtreecommitdiffstats
path: root/src/libs/installer/metadatajob.h
diff options
context:
space:
mode:
authorKatja Marttila <katja.marttila@qt.io>2018-03-28 11:46:38 +0300
committerKatja Marttila <katja.marttila@qt.io>2018-04-03 06:57:06 +0000
commit64a23f240f7a90ae5863ef3d37497e57ae6e8c09 (patch)
treed4d710d51d8e67a6d75e5869d10e569999f4e32b /src/libs/installer/metadatajob.h
parent6f28abfa588d36076ad24f39a17d6752fd070ab6 (diff)
Fix install fail if there is huge amount of downloadable packages
In some machines, installer does not manage to download meta files if there are huge amount of downloadable packages. It seems that QtConcurrent is not always able to handle so many download tasks. Divided the downloadable tasks into size of 1000 to keep the QtConcurrent running. Change-Id: I3ba110e2cc565251e540349a6b073245280a6fbe Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
Diffstat (limited to 'src/libs/installer/metadatajob.h')
-rw-r--r--src/libs/installer/metadatajob.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/libs/installer/metadatajob.h b/src/libs/installer/metadatajob.h
index c6d5ad353..f3f480f6c 100644
--- a/src/libs/installer/metadatajob.h
+++ b/src/libs/installer/metadatajob.h
@@ -79,6 +79,7 @@ private slots:
void startXMLTask(const QList<FileTaskItem> items);
private:
+ bool fetchMetaDataPackages();
void startUnzipRepositoryTask(const Repository &repo);
void reset();
void resetCompressedFetch();
@@ -96,6 +97,10 @@ private:
QHash<QFutureWatcher<void> *, QObject*> m_unzipRepositoryTasks;
bool m_addCompressedPackages;
QList<FileTaskItem> m_unzipRepositoryitems;
+ QList<FileTaskResult> m_metadataResult;
+ int m_downloadableChunkSize;
+ int m_taskNumber;
+ int m_totalTaskCount;
};
} // namespace QInstaller