From 016cdad413c878be9c669398cd707ff5d1d98255 Mon Sep 17 00:00:00 2001 From: Tim Jenssen Date: Wed, 6 Nov 2013 12:45:23 +0100 Subject: Restart on the wizard needs to cleanup component left-overs - use two different script engine instances - one which lives from the beginning -> the controlScriptEngine - the other one which will be reset if there are some new repositories loaded - now the core has a pointer to the gui object, but it should only be used by the script engine so a QObject type should be enough - engines are deleted as QObject children from the PackageManagerCore - registered downloaded archives are removed Change-Id: I60a4a32fb2e409059839ec11b10c57357454f57a Reviewed-by: Michal Klocek Reviewed-by: Karsten Heimrich --- src/libs/installer/packagemanagercore.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/libs/installer/packagemanagercore.h') diff --git a/src/libs/installer/packagemanagercore.h b/src/libs/installer/packagemanagercore.h index 557c4d9ed..392e5a018 100644 --- a/src/libs/installer/packagemanagercore.h +++ b/src/libs/installer/packagemanagercore.h @@ -125,6 +125,9 @@ public: bool run(); void reset(const QHash ¶ms); + void setGuiObject(QObject *gui); + QObject *guiObject() const; + Q_INVOKABLE void setDependsOnLocalInstallerBinary(); Q_INVOKABLE bool localInstallerBinaryUsed(); @@ -177,7 +180,8 @@ public: Q_INVOKABLE bool fileExists(const QString &filePath) const; public: - ScriptEngine *scriptEngine(); + ScriptEngine *componentScriptEngine() const; + ScriptEngine *controlScriptEngine() const; // component handling @@ -301,6 +305,8 @@ Q_SIGNALS: void setAutomatedPageSwitchEnabled(bool request); void coreNetworkSettingsChanged(); + void guiObjectChanged(QObject *gui); + private: struct Data { Package *package; -- cgit v1.2.3