Commit cba909e4 authored by Thomas Hartmann's avatar Thomas Hartmann
Browse files

Expose Internal::ObjectNodeInstance* for auto tests

This allows more precise unit tests on internals
parent 5edab13c
......@@ -140,6 +140,7 @@ public:
#ifdef QTCREATOR_TEST
QObject* testHandle() const;
Internal::ObjectNodeInstance* internalInstance() const;
#endif
private: // functions
NodeInstance(const QSharedPointer<Internal::ObjectNodeInstance> &abstractInstance);
......
......@@ -645,6 +645,11 @@ QObject* NodeInstance::testHandle() const
{
return internalObject();
}
Internal::ObjectNodeInstance* NodeInstance::internalInstance() const
{
return m_nodeInstance.data();
}
#endif
} // namespace QmlDesigner
......@@ -696,6 +696,11 @@ QDeclarativeContext *ObjectNodeInstance::context() const
return 0;
}
QDeclarativeEngine *ObjectNodeInstance::engine() const
{
return nodeInstanceView()->engine();
}
void ObjectNodeInstance::paintUpdate()
{
}
......
......@@ -44,6 +44,7 @@
QT_BEGIN_NAMESPACE
class QGraphicsItem;
class QDeclarativeContext;
class QDeclarativeEngine;
class QDeclarativeProperty;
class QDeclarativeContext;
class QDeclarativeBinding;
......@@ -166,6 +167,7 @@ public:
bool hasBindingForProperty(const QString &name) const;
QDeclarativeContext *context() const;
QDeclarativeEngine *engine() const;
virtual bool updateStateVariant(const NodeInstance &target, const QString &propertyName, const QVariant &value);
virtual bool updateStateBinding(const NodeInstance &target, const QString &propertyName, const QString &expression);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment