Skip to content
Snippets Groups Projects
Commit 521c69a7 authored by Simon Hausmann's avatar Simon Hausmann
Browse files

Fix compilation without declarative backend

parent e722570f
Branches
Tags
No related merge requests found
...@@ -1214,7 +1214,9 @@ Engine::Engine() ...@@ -1214,7 +1214,9 @@ Engine::Engine()
_regexpCtor(0), _regexpCtor(0),
_globalObject(0), _globalObject(0),
_mathObject(0), _mathObject(0),
#ifndef NO_DECLARATIVE_BACKEND
_qmlKeysObject(0), _qmlKeysObject(0),
#endif
_convertToNumber(this), _convertToNumber(this),
_convertToString(this), _convertToString(this),
_convertToObject(this) _convertToObject(this)
...@@ -1670,14 +1672,20 @@ void Engine::initializePrototypes() ...@@ -1670,14 +1672,20 @@ void Engine::initializePrototypes()
_globalObject->setProperty("Date", dateCtor()); _globalObject->setProperty("Date", dateCtor());
_globalObject->setProperty("RegExp", regexpCtor()); _globalObject->setProperty("RegExp", regexpCtor());
#ifndef NO_DECLARATIVE_BACKEND
_qmlKeysObject = new QmlAttachedKeys(this); _qmlKeysObject = new QmlAttachedKeys(this);
_globalObject->setProperty("Keys", _qmlKeysObject); // ### attach it to the current scope, and not to the global object _globalObject->setProperty("Keys", _qmlKeysObject); // ### attach it to the current scope, and not to the global object
registerObject(_qmlKeysObject); registerObject(_qmlKeysObject);
#endif
} }
const ObjectValue *Engine::qmlKeysObject() const ObjectValue *Engine::qmlKeysObject()
{ {
#ifndef NO_DECLARATIVE_BACKEND
return _qmlKeysObject; return _qmlKeysObject;
#else
return 0;
#endif
} }
const Value *Engine::defaultValueForBuiltinType(const QString &typeName) const const Value *Engine::defaultValueForBuiltinType(const QString &typeName) const
......
...@@ -504,7 +504,9 @@ private: ...@@ -504,7 +504,9 @@ private:
ObjectValue *_globalObject; ObjectValue *_globalObject;
ObjectValue *_mathObject; ObjectValue *_mathObject;
#ifndef NO_DECLARATIVE_BACKEND
ObjectValue *_qmlKeysObject; ObjectValue *_qmlKeysObject;
#endif
NullValue _nullValue; NullValue _nullValue;
UndefinedValue _undefinedValue; UndefinedValue _undefinedValue;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment