diff options
Diffstat (limited to 'src/libs/installer/component.h')
-rw-r--r-- | src/libs/installer/component.h | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/src/libs/installer/component.h b/src/libs/installer/component.h index dbf604a56..8f17b2d98 100644 --- a/src/libs/installer/component.h +++ b/src/libs/installer/component.h @@ -1,6 +1,6 @@ /************************************************************************** ** -** Copyright (C) 2022 The Qt Company Ltd. +** Copyright (C) 2023 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the Qt Installer Framework. @@ -32,7 +32,6 @@ #include "constants.h" #include "component_p.h" #include "qinstallerglobal.h" -#include "packagemanagercore.h" #include <QtCore/QDir> #include <QtCore/QMetaType> @@ -44,6 +43,8 @@ QT_FORWARD_DECLARE_CLASS(QQmlV4Function) namespace QInstaller { +class PackageManagerCore; + class INSTALLER_EXPORT Component : public QObject, public ComponentModelHelper { Q_OBJECT @@ -118,10 +119,9 @@ public: void removeComponent(Component *component); QList<Component*> descendantComponents() const; - void loadComponentScript(); + void loadComponentScript(const bool postLoad = false); + void evaluateComponentScript(const QString &fileName, const bool postScriptContext = false); - //move this to private - void loadComponentScript(const QString &fileName); void loadTranslations(const QDir &directory, const QStringList &qms); void loadUserInterfaces(const QDir &directory, const QStringList &uis); void loadLicenses(const QString &directory, const QHash<QString, QVariant> &hash); @@ -150,9 +150,10 @@ public: Q_INVOKABLE bool addElevatedOperation(QQmlV4Function *args); bool addElevatedOperation(const QString &operation, const QStringList ¶meters); - QStringList downloadableArchives() const; + QStringList downloadableArchives(); Q_INVOKABLE void addDownloadableArchive(const QString &path); Q_INVOKABLE void removeDownloadableArchive(const QString &path); + void addDownloadableArchives(const QString& archives); QStringList stopProcessForUpdateRequests() const; Q_INVOKABLE void addStopProcessForUpdateRequest(const QString &process); @@ -170,8 +171,10 @@ public: Q_INVOKABLE void addDependency(const QString &newDependency); QStringList dependencies() const; + QStringList localDependencies() const; Q_INVOKABLE void addAutoDependOn(const QString &newDependOn); QStringList autoDependencies() const; + QStringList currentDependencies() const; void languageChanged(); QString localTempPath() const; @@ -195,7 +198,7 @@ public: Q_INVOKABLE void setUpdateAvailable(bool isUpdateAvailable); Q_INVOKABLE bool isUpdateAvailable() const; - Q_INVOKABLE bool updateRequested(); + Q_INVOKABLE bool updateRequested() const; Q_INVOKABLE bool componentChangeRequested(); Q_INVOKABLE bool isForcedUpdate(); @@ -206,6 +209,7 @@ public: bool isVirtual() const; bool isSelected() const; bool forcedInstallation() const; + bool isEssential() const; void setValidatorCallbackName(const QString &name); @@ -234,6 +238,8 @@ private: Operation *createOperation(const QString &operationName, const QStringList ¶meters); void markComponentUnstable(const Component::UnstableError error, const QString &errorMessage); + QJSValue callScriptMethod(const QString &methodName, const QJSValueList &arguments = QJSValueList()) const; + private: QString validatorCallbackName; ComponentPrivate *d; |