summaryrefslogtreecommitdiffstats
path: root/src/libs/installer/scriptengine.h
diff options
context:
space:
mode:
authorTim Jenssen <tim.jenssen@digia.com>2013-05-29 15:21:59 +0200
committerTim Jenssen <tim.jenssen@digia.com>2013-06-03 16:35:28 +0200
commitdfbb731676e59b42f548dfca15e60f08cfcdc2f5 (patch)
tree99f790422f6e1fe6af404dfe78c082fa5656eb70 /src/libs/installer/scriptengine.h
parentc2cfa6dd833f60d75cc7aafe7282d052cdae5257 (diff)
add exceptionhandler code for connected signals/JS methods
- there wasn't any error information if a C++ triggered signal resulted in a JS method which has an error, now it will create an exception for it - creating messagebox inside the lib is something what we want to avoid, so the developer itself is responsible to catch these exceptions - most cases of the installer code does that already Change-Id: I07486f73be9de13a486de235f14e3a7d7b54f5b1 Reviewed-by: Karsten Heimrich <karsten.heimrich@digia.com>
Diffstat (limited to 'src/libs/installer/scriptengine.h')
-rw-r--r--src/libs/installer/scriptengine.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/libs/installer/scriptengine.h b/src/libs/installer/scriptengine.h
index 9c7d84fcf..50c50539b 100644
--- a/src/libs/installer/scriptengine.h
+++ b/src/libs/installer/scriptengine.h
@@ -71,11 +71,12 @@ public:
explicit ScriptEngine(PackageManagerCore *core);
~ScriptEngine();
void setGuiQObject(QObject *guiQObject);
- QScriptValue callScriptMethod(const QScriptValue &scriptContext, const QString &name,
- const QScriptValueList &parameters = QScriptValueList()) const;
+ QScriptValue callScriptMethod(const QScriptValue &scriptContext, const QString &methodName,
+ const QScriptValueList &arguments = QScriptValueList()) const;
QScriptValue loadInConext(const QString &context, const QString &fileName, const QString &scriptInjection = QString());
-
+private slots:
+ void handleException(const QScriptValue &value);
private:
QScriptValue generateMessageBoxObject();
QScriptValue generateDesktopServicesObject();