diff options
author | Arttu Tarkiainen <arttu.tarkiainen@qt.io> | 2022-08-24 12:19:11 +0300 |
---|---|---|
committer | Arttu Tarkiainen <arttu.tarkiainen@qt.io> | 2022-10-14 15:15:51 +0300 |
commit | 59ce8c088fca01cfbabe9918302bdb0ee2eaf037 (patch) | |
tree | 0da452a18decd3f286fc2fda63307a7305891c39 /src/libs/installer/fileutils.h | |
parent | 30de0fe3f01ac3d6a0ee0a288d51dc920e4432ca (diff) |
Add persistent metadata file cache
Introduce GenericDataCache and Metadata classes for storing the
fetched metadata files (Updates.xml and uncompressed files from
the meta.7z archives) on local filesystem.
The cache uses a checksum based dictionary to keep track of the
cached metadata items, with the SHA1 sums of downloaded Updates.xml
files being the keys to refer single metadata item. We still need
to download all the Updates.xml files on each fetch to check if the
cached metadata items are applicable for the current repositories.
Update the Updates.xml files in auto-test data to have unique
contents, otherwise there could be conflicts with identical test
repositories, as the tests will also utilize the cache now.
Also omit registering Repository type to the meta-object system in
the class contructors, this is expensive as we construct objects
from the class frequently, in the worst case hundreds of thousands
times. PackageManagerCore already does the registering.
Task-number: QTIFW-2621
Change-Id: Iee10ead68befd722ffe7f18ca48483d5a3666658
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Katja Marttila <katja.marttila@qt.io>
Diffstat (limited to 'src/libs/installer/fileutils.h')
-rw-r--r-- | src/libs/installer/fileutils.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/libs/installer/fileutils.h b/src/libs/installer/fileutils.h index 8b79ce052..304569ec5 100644 --- a/src/libs/installer/fileutils.h +++ b/src/libs/installer/fileutils.h @@ -49,12 +49,12 @@ enum DefaultFilePermissions { Executable = 0x7755 }; -class INSTALLER_EXPORT TempDirDeleter +class INSTALLER_EXPORT TempPathDeleter { public: - explicit TempDirDeleter(const QString &path); - explicit TempDirDeleter(const QStringList &paths = QStringList()); - ~TempDirDeleter(); + explicit TempPathDeleter(const QString &path); + explicit TempPathDeleter(const QStringList &paths = QStringList()); + ~TempPathDeleter(); QStringList paths() const; @@ -65,7 +65,7 @@ public: void releaseAndDelete(const QString &path); private: - Q_DISABLE_COPY(TempDirDeleter) + Q_DISABLE_COPY(TempPathDeleter) QSet<QString> m_paths; }; |