Fix compilation without declarative backend

This commit is contained in:
Simon Hausmann
2010-01-26 12:06:44 +01:00
parent e722570f06
commit 521c69a744
2 changed files with 10 additions and 0 deletions

View File

@@ -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

View File

@@ -504,7 +504,9 @@ private:
ObjectValue *_globalObject;
ObjectValue *_mathObject;
#ifndef NO_DECLARATIVE_BACKEND
ObjectValue *_qmlKeysObject;
#endif
NullValue _nullValue;
UndefinedValue _undefinedValue;