diff options
author | Martin Jones <martin.jones@nokia.com> | 2009-11-30 09:14:43 (GMT) |
---|---|---|
committer | Martin Jones <martin.jones@nokia.com> | 2009-11-30 09:14:43 (GMT) |
commit | 81542982a9b7f4d55707ec6abfd26f5046871f88 (patch) | |
tree | 56b023bea089c960cec64483cf6d62304aa274f4 /src/declarative/qml/qmlengine.cpp | |
parent | 126ab609611d188322eeaeca38ecc9ae13e9574b (diff) | |
parent | bd2ba54d85415047a581b7b441309572a756dcc5 (diff) | |
download | Qt-81542982a9b7f4d55707ec6abfd26f5046871f88.zip Qt-81542982a9b7f4d55707ec6abfd26f5046871f88.tar.gz Qt-81542982a9b7f4d55707ec6abfd26f5046871f88.tar.bz2 |
Merge branch 'kinetic-declarativeui' of git@scm.dev.nokia.troll.no:qt/kinetic into kinetic-declarativeui
Diffstat (limited to 'src/declarative/qml/qmlengine.cpp')
-rw-r--r-- | src/declarative/qml/qmlengine.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/declarative/qml/qmlengine.cpp b/src/declarative/qml/qmlengine.cpp index c0692eb..864d07e 100644 --- a/src/declarative/qml/qmlengine.cpp +++ b/src/declarative/qml/qmlengine.cpp @@ -147,6 +147,7 @@ QmlEnginePrivate::QmlEnginePrivate(QmlEngine *e) qtObject.setProperty(QLatin1String("md5"),scriptEngine.newFunction(md5, 1)); qtObject.setProperty(QLatin1String("btoa"),scriptEngine.newFunction(btoa, 1)); qtObject.setProperty(QLatin1String("atob"),scriptEngine.newFunction(atob, 1)); + qtObject.setProperty(QLatin1String("quit"), scriptEngine.newFunction(QmlEnginePrivate::quit, 0)); //firebug/webkit compat QScriptValue consoleObject = scriptEngine.newObject(); @@ -868,6 +869,19 @@ QScriptValue QmlEnginePrivate::consoleLog(QScriptContext *ctxt, QScriptEngine *e return e->newVariant(QVariant(true)); } +void QmlEnginePrivate::sendQuit () +{ + Q_Q(QmlEngine); + emit q->quit (); +} + +QScriptValue QmlEnginePrivate::quit(QScriptContext *ctxt, QScriptEngine *e) +{ + QmlEnginePrivate *qe = get (e); + qe->sendQuit (); + return QScriptValue(); +} + QScriptValue QmlEnginePrivate::closestAngle(QScriptContext *ctxt, QScriptEngine *e) { if(ctxt->argumentCount() < 2) |