qmljs: exposing a bit more the existence of private value types

Change-Id: I85e29b0d60234407561ecbeb2883d68c1acb71d6
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
This commit is contained in:
Fawzi Mohamed
2014-05-21 16:13:09 +02:00
parent 56080c4df2
commit 35128701cd
3 changed files with 148 additions and 10 deletions

View File

@@ -44,7 +44,8 @@ using namespace QmlJS;
A ValueOwner also provides access to various default values.
*/
namespace {
namespace QmlJS {
namespace Internal {
class QtObjectPrototypeReference : public Reference
{
@@ -52,7 +53,10 @@ public:
QtObjectPrototypeReference(ValueOwner *owner)
: Reference(owner)
{}
const QtObjectPrototypeReference *asQtObjectPrototypeReference() const QTC_OVERRIDE
{
return this;
}
private:
virtual const Value *value(ReferenceContext *referenceContext) const
{
@@ -60,7 +64,8 @@ private:
}
};
} // end of anonymous namespace
} // end of Internal namespace
} // end of QmlJS namespace
// globally shared data
@@ -577,7 +582,7 @@ SharedValueOwner::SharedValueOwner(SharedValueOwnerKind kind)
addFunction(_qmlMatrix4x4Object, QLatin1String("fuzzyEquals"), booleanValue(), 1, 1);
// global Qt object, in alphabetic order
_qtObject = newObject(new QtObjectPrototypeReference(this));
_qtObject = newObject(new Internal::QtObjectPrototypeReference(this));
ObjectValue *applicationObject = newObject();
applicationObject->setMember(QLatin1String("active"), booleanValue());