forked from qt-creator/qt-creator
QmlDesigner: Add more tracing to properties
Task-number: QDS-11952 Change-Id: I27376acc1a77291de2253a295df0e3cecce1427e Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
@@ -21,8 +21,11 @@ QString InternalBindingProperty::expression() const
|
|||||||
{
|
{
|
||||||
return m_expression;
|
return m_expression;
|
||||||
}
|
}
|
||||||
|
|
||||||
void InternalBindingProperty::setExpression(const QString &expression)
|
void InternalBindingProperty::setExpression(const QString &expression)
|
||||||
{
|
{
|
||||||
|
traceToken.tick("expression"_t, keyValue("expression", expression));
|
||||||
|
|
||||||
m_expression = expression;
|
m_expression = expression;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -40,12 +40,20 @@ int InternalNodeListProperty::indexOf(const InternalNode::Pointer &node) const
|
|||||||
void InternalNodeListProperty::add(const InternalNode::Pointer &internalNode)
|
void InternalNodeListProperty::add(const InternalNode::Pointer &internalNode)
|
||||||
{
|
{
|
||||||
Q_ASSERT(!m_nodeList.contains(internalNode));
|
Q_ASSERT(!m_nodeList.contains(internalNode));
|
||||||
|
|
||||||
|
auto flowToken = traceToken.tickWithFlow("add node"_t);
|
||||||
|
internalNode->traceToken.tick(flowToken, "node added"_t);
|
||||||
|
|
||||||
m_nodeList.append(internalNode);
|
m_nodeList.append(internalNode);
|
||||||
}
|
}
|
||||||
|
|
||||||
void InternalNodeListProperty::remove(const InternalNodePointer &internalNode)
|
void InternalNodeListProperty::remove(const InternalNodePointer &internalNode)
|
||||||
{
|
{
|
||||||
Q_ASSERT(m_nodeList.contains(internalNode));
|
Q_ASSERT(m_nodeList.contains(internalNode));
|
||||||
|
|
||||||
|
auto flowToken = traceToken.tickWithFlow("remove node"_t);
|
||||||
|
internalNode->traceToken.tick(flowToken, "node removed"_t);
|
||||||
|
|
||||||
m_nodeList.removeAll(internalNode);
|
m_nodeList.removeAll(internalNode);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -42,6 +42,10 @@ bool InternalNodeProperty::isValid() const
|
|||||||
void InternalNodeProperty::remove([[maybe_unused]] const InternalNode::Pointer &node)
|
void InternalNodeProperty::remove([[maybe_unused]] const InternalNode::Pointer &node)
|
||||||
{
|
{
|
||||||
Q_ASSERT(m_node == node);
|
Q_ASSERT(m_node == node);
|
||||||
|
|
||||||
|
auto flowToken = traceToken.tickWithFlow("remove node"_t);
|
||||||
|
node->traceToken.tick(flowToken, "node removed"_t);
|
||||||
|
|
||||||
m_node.reset();
|
m_node.reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -49,6 +53,10 @@ void InternalNodeProperty::add(const InternalNode::Pointer &node)
|
|||||||
{
|
{
|
||||||
Q_ASSERT(node);
|
Q_ASSERT(node);
|
||||||
Q_ASSERT(node->parentProperty());
|
Q_ASSERT(node->parentProperty());
|
||||||
|
|
||||||
|
auto flowToken = traceToken.tickWithFlow("add node"_t);
|
||||||
|
node->traceToken.tick(flowToken, "node added"_t);
|
||||||
|
|
||||||
m_node = node;
|
m_node = node;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -70,12 +70,16 @@ TypeName InternalProperty::dynamicTypeName() const
|
|||||||
|
|
||||||
void InternalProperty::setDynamicTypeName(const TypeName &name)
|
void InternalProperty::setDynamicTypeName(const TypeName &name)
|
||||||
{
|
{
|
||||||
|
traceToken.tick("dynamic type name"_t, keyValue("name", name));
|
||||||
|
|
||||||
m_dynamicType = name;
|
m_dynamicType = name;
|
||||||
}
|
}
|
||||||
|
|
||||||
void InternalProperty::resetDynamicTypeName()
|
void InternalProperty::resetDynamicTypeName()
|
||||||
{
|
{
|
||||||
m_dynamicType.clear();
|
traceToken.tick("reset dynamic type name"_t);
|
||||||
|
|
||||||
|
m_dynamicType.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace Internal
|
} // namespace Internal
|
||||||
|
@@ -193,6 +193,8 @@ private:
|
|||||||
TypeName m_dynamicType;
|
TypeName m_dynamicType;
|
||||||
std::weak_ptr<InternalNode> m_propertyOwner;
|
std::weak_ptr<InternalNode> m_propertyOwner;
|
||||||
PropertyType m_propertyType = PropertyType::None;
|
PropertyType m_propertyType = PropertyType::None;
|
||||||
|
|
||||||
|
protected:
|
||||||
NO_UNIQUE_ADDRESS ModelTracing::AsynchronousToken traceToken;
|
NO_UNIQUE_ADDRESS ModelTracing::AsynchronousToken traceToken;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -23,6 +23,8 @@ QString InternalSignalHandlerProperty::source() const
|
|||||||
}
|
}
|
||||||
void InternalSignalHandlerProperty::setSource(const QString &source)
|
void InternalSignalHandlerProperty::setSource(const QString &source)
|
||||||
{
|
{
|
||||||
|
traceToken.tick("source"_t, keyValue("source", source));
|
||||||
|
|
||||||
m_source = source;
|
m_source = source;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -38,6 +40,8 @@ QString InternalSignalDeclarationProperty::signature() const
|
|||||||
|
|
||||||
void InternalSignalDeclarationProperty::setSignature(const QString &signature)
|
void InternalSignalDeclarationProperty::setSignature(const QString &signature)
|
||||||
{
|
{
|
||||||
|
traceToken.tick("signature"_t, keyValue("signature", signature));
|
||||||
|
|
||||||
m_signature = signature;
|
m_signature = signature;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -19,6 +19,8 @@ QVariant InternalVariantProperty::value() const
|
|||||||
|
|
||||||
void InternalVariantProperty::setValue(const QVariant &value)
|
void InternalVariantProperty::setValue(const QVariant &value)
|
||||||
{
|
{
|
||||||
|
traceToken.tick("value"_t, keyValue("value", value));
|
||||||
|
|
||||||
m_value = value;
|
m_value = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user