summaryrefslogtreecommitdiffstats
path: root/src/libs/installer/scriptengine.h
diff options
context:
space:
mode:
authorKai Koehne <kai.koehne@theqtcompany.com>2015-01-05 16:44:07 +0100
committerKai Koehne <kai.koehne@theqtcompany.com>2015-01-07 16:17:33 +0100
commit8d86c06aef110ad6cf6f1dcb6af56b19ddbe7f24 (patch)
tree83de7bb341cf7a7594a6f9943109093112723e5c /src/libs/installer/scriptengine.h
parent8812ca2b3fcaf241209925eea3999b1fe8481b13 (diff)
Simplify registration of objects into script engine
Rename addQObjectChildren, removeQObjectChildren methods to addToGlobalObject, removeToGlobalObject, and merge the augmentation of the properties with newQObject. Also, don't recursively register all objects with their objectNames in the global scope. This avoids name pollution. Change-Id: I28f1bc67e6febecc7b5142982c918432b61ed96f Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
Diffstat (limited to 'src/libs/installer/scriptengine.h')
-rw-r--r--src/libs/installer/scriptengine.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libs/installer/scriptengine.h b/src/libs/installer/scriptengine.h
index c4352d4ca..c5219dc09 100644
--- a/src/libs/installer/scriptengine.h
+++ b/src/libs/installer/scriptengine.h
@@ -57,8 +57,8 @@ public:
QJSValue evaluate(const QString &program, const QString &fileName = QString(),
int lineNumber = 1);
- void addQObjectChildren(QObject *root);
- void removeQObjectChildren(QObject *root);
+ void addToGlobalObject(QObject *object);
+ void removeFromGlobalObject(QObject *object);
QJSValue loadInContext(const QString &context, const QString &fileName,
const QString &scriptInjection = QString());