aboutsummaryrefslogtreecommitdiffstats
path: root/src/libs/qmljs/qmljsinterpreter.cpp
diff options
context:
space:
mode:
authorSimon Hausmann <[email protected]>2010-01-26 12:06:44 +0100
committerSimon Hausmann <[email protected]>2010-01-26 12:06:58 +0100
commit521c69a744b4f5969510489f0da1b51d965804d5 (patch)
tree2f4d676115193a8f5e277922c8cbdbf16bf3698f /src/libs/qmljs/qmljsinterpreter.cpp
parente722570f0603be1b48f6ae5a0441bdb633af6b1c (diff)
Fix compilation without declarative backend
Diffstat (limited to 'src/libs/qmljs/qmljsinterpreter.cpp')
-rw-r--r--src/libs/qmljs/qmljsinterpreter.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/libs/qmljs/qmljsinterpreter.cpp b/src/libs/qmljs/qmljsinterpreter.cpp
index f8ee91ca442..149a56ccb1a 100644
--- a/src/libs/qmljs/qmljsinterpreter.cpp
+++ b/src/libs/qmljs/qmljsinterpreter.cpp
@@ -1214,7 +1214,9 @@ Engine::Engine()
_regexpCtor(0),
_globalObject(0),
_mathObject(0),
+#ifndef NO_DECLARATIVE_BACKEND
_qmlKeysObject(0),
+#endif
_convertToNumber(this),
_convertToString(this),
_convertToObject(this)
@@ -1670,14 +1672,20 @@ void Engine::initializePrototypes()
_globalObject->setProperty("Date", dateCtor());
_globalObject->setProperty("RegExp", regexpCtor());
+#ifndef NO_DECLARATIVE_BACKEND
_qmlKeysObject = new QmlAttachedKeys(this);
_globalObject->setProperty("Keys", _qmlKeysObject); // ### attach it to the current scope, and not to the global object
registerObject(_qmlKeysObject);
+#endif
}
const ObjectValue *Engine::qmlKeysObject()
{
+#ifndef NO_DECLARATIVE_BACKEND
return _qmlKeysObject;
+#else
+ return 0;
+#endif
}
const Value *Engine::defaultValueForBuiltinType(const QString &typeName) const