summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorKatja Marttila <katja.marttila@qt.io>2023-01-26 14:34:57 +0200
committerKatja Marttila <katja.marttila@qt.io>2023-02-09 13:55:24 +0200
commit871832b8b67eb55208031f4b7edb6c02b824ad00 (patch)
treef97c7285958bcd9f4054596fffce0c53d8ba0182 /tests/auto
parentc9d7f2a3f72ced2dd576057b84bf03c6ece260af (diff)
Optimize Updates.xml parsing
Updates.xml file elements are read and based on that the installer calculates for example applicable updates. The files were parsed one by one which was not very optimal at least in Windows when reading a lot of files. Fixing the reading so that all files can be read and parsed using QtConcurrent. Also changing the class structure so that the private class is removed and private functions used instead. Another option would have been to create header file to the private class due to the Q_OBJECT definition in ParseXMLFilesTask. Task-number: QTIFW-2805 Change-Id: I40d1c75b87f4bf1f5a8fcd874edf84023891bdcc Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/installer/brokeninstaller/tst_brokeninstaller.cpp1
-rw-r--r--tests/auto/installer/componentmodel/tst_componentmodel.cpp1
2 files changed, 2 insertions, 0 deletions
diff --git a/tests/auto/installer/brokeninstaller/tst_brokeninstaller.cpp b/tests/auto/installer/brokeninstaller/tst_brokeninstaller.cpp
index 9fbc12c41..5978b3bb2 100644
--- a/tests/auto/installer/brokeninstaller/tst_brokeninstaller.cpp
+++ b/tests/auto/installer/brokeninstaller/tst_brokeninstaller.cpp
@@ -157,6 +157,7 @@ private:
{
UpdatesInfo updatesInfo;
updatesInfo.setFileName(":///data/updates.xml");
+ updatesInfo.parseFile();
const QList<UpdateInfo> updateInfos = updatesInfo.updatesInfo();
QList <Component*> components;
diff --git a/tests/auto/installer/componentmodel/tst_componentmodel.cpp b/tests/auto/installer/componentmodel/tst_componentmodel.cpp
index 2836c80df..6bf78d88d 100644
--- a/tests/auto/installer/componentmodel/tst_componentmodel.cpp
+++ b/tests/auto/installer/componentmodel/tst_componentmodel.cpp
@@ -526,6 +526,7 @@ private:
{
UpdatesInfo updatesInfo;
updatesInfo.setFileName(":///data/updates.xml");
+ updatesInfo.parseFile();
const QList<UpdateInfo> updateInfos = updatesInfo.updatesInfo();
QHash<QString, Component*> components;