forked from qt-creator/qt-creator
QmlDesigner: Adding debugging operator to BindingProperty
This is required to output the expression in the DebugView. Change-Id: I3ce0bf4a916e30e8c86c224e305fa1c4af337489 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
committed by
Tim Jenssen
parent
7c3f61f819
commit
5c5197d19d
@@ -58,4 +58,7 @@ protected:
|
|||||||
|
|
||||||
bool compareBindingProperties(const QmlDesigner::BindingProperty &bindingProperty01, const QmlDesigner::BindingProperty &bindingProperty02);
|
bool compareBindingProperties(const QmlDesigner::BindingProperty &bindingProperty01, const QmlDesigner::BindingProperty &bindingProperty02);
|
||||||
|
|
||||||
|
QMLDESIGNERCORE_EXPORT QTextStream& operator<<(QTextStream &stream, const BindingProperty &property);
|
||||||
|
QMLDESIGNERCORE_EXPORT QDebug operator<<(QDebug debug, const BindingProperty &AbstractProperty);
|
||||||
|
|
||||||
} // namespace QmlDesigner
|
} // namespace QmlDesigner
|
||||||
|
|||||||
@@ -244,4 +244,22 @@ void BindingProperty::setDynamicTypeNameAndExpression(const TypeName &typeName,
|
|||||||
model()->d->setDynamicBindingProperty(internalNode(), name(), typeName, expression);
|
model()->d->setDynamicBindingProperty(internalNode(), name(), typeName, expression);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QDebug operator<<(QDebug debug, const BindingProperty &property)
|
||||||
|
{
|
||||||
|
if (!property.isValid())
|
||||||
|
return debug.nospace() << "BindingProperty(" << PropertyName("invalid") << ')';
|
||||||
|
else
|
||||||
|
return debug.nospace() << "BindingProperty(" << property.name() << " " << property.expression() << ')';
|
||||||
|
}
|
||||||
|
|
||||||
|
QTextStream& operator<<(QTextStream &stream, const BindingProperty &property)
|
||||||
|
{
|
||||||
|
if (!property.isValid())
|
||||||
|
stream << "BindingProperty(" << PropertyName("invalid") << ')';
|
||||||
|
else
|
||||||
|
stream << "BindingProperty(" << property.name() << " " << property.expression() << ')';
|
||||||
|
|
||||||
|
return stream;
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace QmlDesigner
|
} // namespace QmlDesigner
|
||||||
|
|||||||
Reference in New Issue
Block a user