QQmlBinding::QQmlBinding(const QString &str, QObject *obj, QQmlContext *ctxt)
: QQmlJavaScriptExpression(),
- QQmlAbstractBinding(Binding),
- m_updating(false),
- m_enabled(false)
+ QQmlAbstractBinding(Binding)
{
setNotifyOnValueChanged(true);
QQmlJavaScriptExpression::setContext(QQmlContextData::get(ctxt));
QQmlBinding::QQmlBinding(const QQmlScriptString &script, QObject *obj, QQmlContext *ctxt)
: QQmlJavaScriptExpression(),
- QQmlAbstractBinding(Binding),
- m_updating(false),
- m_enabled(false)
+ QQmlAbstractBinding(Binding)
{
if (ctxt && !ctxt->isValid())
return;
QQmlBinding::QQmlBinding(const QString &str, QObject *obj, QQmlContextData *ctxt)
: QQmlJavaScriptExpression(),
- QQmlAbstractBinding(Binding),
- m_updating(false),
- m_enabled(false)
+ QQmlAbstractBinding(Binding)
{
setNotifyOnValueChanged(true);
QQmlJavaScriptExpression::setContext(ctxt);
QQmlContextData *ctxt,
const QString &url, quint16 lineNumber, quint16 columnNumber)
: QQmlJavaScriptExpression(),
- QQmlAbstractBinding(Binding),
- m_updating(false),
- m_enabled(false)
+ QQmlAbstractBinding(Binding)
{
Q_UNUSED(columnNumber);
setNotifyOnValueChanged(true);
QQmlBinding::QQmlBinding(const QV4::Value &functionPtr, QObject *obj, QQmlContextData *ctxt)
: QQmlJavaScriptExpression(),
- QQmlAbstractBinding(Binding),
- m_updating(false),
- m_enabled(false)
+ QQmlAbstractBinding(Binding)
{
setNotifyOnValueChanged(true);
QQmlJavaScriptExpression::setContext(ctxt);
QQmlBinding *t = this;
int status = -1;
void *a[] = { &t, 0, &status, &flags };
- QMetaObject::metacall(m_coreObject, QMetaObject::WriteProperty, idx, a);
+ QMetaObject::metacall(*m_coreObject, QMetaObject::WriteProperty, idx, a);
} else {
ep->referenceScarceResources();
bool needsErrorLocationData = false;
if (!watcher.wasDeleted() && !hasError())
- needsErrorLocationData = !QQmlPropertyPrivate::writeBinding(m_coreObject, m_core, context(),
+ needsErrorLocationData = !QQmlPropertyPrivate::writeBinding(*m_coreObject, m_core, context(),
this, result, isUndefined, flags);
if (!watcher.wasDeleted()) {
QObject *QQmlBinding::targetObject() const
{
- return m_coreObject;
+ return *m_coreObject;
}
int QQmlBinding::targetPropertyIndex() const
inline bool enabledFlag() const;
inline void setEnabledFlag(bool);
- QObject *m_coreObject;
+ QFlagPointer<QObject> m_coreObject;
QQmlPropertyData m_core;
- uint m_updating : 1;
- uint m_enabled : 1;
};
bool QQmlBinding::updatingFlag() const
{
- return m_updating;
+ return m_coreObject.flag();
}
void QQmlBinding::setUpdatingFlag(bool v)
{
- m_updating = v;
+ m_coreObject.setFlagValue(v);
}
bool QQmlBinding::enabledFlag() const
{
- return m_enabled;
+ return m_coreObject.flag2();
}
void QQmlBinding::setEnabledFlag(bool v)
{
- m_enabled = v;
+ m_coreObject.setFlag2Value(v);
}
QT_END_NAMESPACE