diff options
author | Arttu Tarkiainen <arttu.tarkiainen@qt.io> | 2022-10-20 14:58:28 +0300 |
---|---|---|
committer | Arttu Tarkiainen <arttu.tarkiainen@qt.io> | 2022-10-21 15:46:37 +0300 |
commit | da6c97cc99162aa1a4916e7b77eefd7f631d11af (patch) | |
tree | 1a09f2c41f4a7f07bfd7e36f45be49f6a5fd72e0 /src/libs/installer/packagemanagercore.h | |
parent | 422202d41537729d6fcdb853f686a51f20239f18 (diff) |
CLI: Add new '--cache-path' option
The option can be used to select the path for metadata cache without
opening the installer's settings dialog.
Add public PackageManagerCore::resetLocalCache() function and remove
automatic initialization of the local cache in the private core class
constructor, so we can control the timeline better. Also make
PackageManagerCore::clearLocalCache() a regular member function as
it does not need to be a Qt slot.
Task-number: QTIFW-2810
Change-Id: Ia4a903026a10b90da16ba1b93fd3098a709f7ed7
Reviewed-by: Katja Marttila <katja.marttila@qt.io>
Diffstat (limited to 'src/libs/installer/packagemanagercore.h')
-rw-r--r-- | src/libs/installer/packagemanagercore.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/libs/installer/packagemanagercore.h b/src/libs/installer/packagemanagercore.h index db1c0765f..2c307971a 100644 --- a/src/libs/installer/packagemanagercore.h +++ b/src/libs/installer/packagemanagercore.h @@ -345,6 +345,9 @@ public: void createLocalDependencyHash(const QString &component, const QString &dependencies) const; void createAutoDependencyHash(const QString &component, const QString &oldDependencies, const QString &newDependencies) const; + bool resetLocalCache(bool init = false); + bool clearLocalCache(QString *error = nullptr); + public Q_SLOTS: bool runInstaller(); bool runUninstaller(); @@ -355,7 +358,6 @@ public Q_SLOTS: void languageChanged(); void setCompleteUninstallation(bool complete); void cancelMetaInfoJob(); - bool clearLocalCache(QString *error = nullptr); void componentsToInstallNeedsRecalculation(); void calculateUserSelectedComponentsToInstall(const QList<QModelIndex> &indexes); void clearComponentsToInstallCalculated(); |