Commit f97df3e9 authored by Marco Bubke's avatar Marco Bubke

QmlDesigner: Add RewriterTransaction tracing framework

Change-Id: I6c152e128e0a1b1d4450bbba81e47d072aac3038
Reviewed-by: default avatarThomas Hartmann <Thomas.Hartmann@digia.com>
parent 721feaf5
...@@ -32,6 +32,7 @@ ...@@ -32,6 +32,7 @@
#include <cmath> #include <cmath>
#include <QMessageBox> #include <QMessageBox>
#include <QByteArray>
#include <nodeabstractproperty.h> #include <nodeabstractproperty.h>
#include <nodemetainfo.h> #include <nodemetainfo.h>
#include <modelnode.h> #include <modelnode.h>
...@@ -211,7 +212,7 @@ void raise(const SelectionContext &selectionState) ...@@ -211,7 +212,7 @@ void raise(const SelectionContext &selectionState)
return; return;
try { try {
RewriterTransaction transaction(selectionState.view()); RewriterTransaction transaction(selectionState.view(), QByteArrayLiteral("DesignerActionManager|raise"));
foreach (ModelNode modelNode, selectionState.selectedModelNodes()) { foreach (ModelNode modelNode, selectionState.selectedModelNodes()) {
QmlItemNode node = modelNode; QmlItemNode node = modelNode;
if (node.isValid()) { if (node.isValid()) {
...@@ -232,7 +233,7 @@ void lower(const SelectionContext &selectionState) ...@@ -232,7 +233,7 @@ void lower(const SelectionContext &selectionState)
return; return;
try { try {
RewriterTransaction transaction(selectionState.view()); RewriterTransaction transaction(selectionState.view(), QByteArrayLiteral("DesignerActionManager|lower"));
foreach (ModelNode modelNode, selectionState.selectedModelNodes()) { foreach (ModelNode modelNode, selectionState.selectedModelNodes()) {
QmlItemNode node = modelNode; QmlItemNode node = modelNode;
if (node.isValid()) { if (node.isValid()) {
...@@ -302,7 +303,7 @@ void resetSize(const SelectionContext &selectionState) ...@@ -302,7 +303,7 @@ void resetSize(const SelectionContext &selectionState)
return; return;
try { try {
RewriterTransaction transaction(selectionState.view()); RewriterTransaction transaction(selectionState.view(), QByteArrayLiteral("DesignerActionManager|resetSize"));
foreach (ModelNode node, selectionState.selectedModelNodes()) { foreach (ModelNode node, selectionState.selectedModelNodes()) {
node.removeProperty("width"); node.removeProperty("width");
node.removeProperty("height"); node.removeProperty("height");
...@@ -318,7 +319,7 @@ void resetPosition(const SelectionContext &selectionState) ...@@ -318,7 +319,7 @@ void resetPosition(const SelectionContext &selectionState)
return; return;
try { try {
RewriterTransaction transaction(selectionState.view()); RewriterTransaction transaction(selectionState.view(), QByteArrayLiteral("DesignerActionManager|resetPosition"));
foreach (ModelNode node, selectionState.selectedModelNodes()) { foreach (ModelNode node, selectionState.selectedModelNodes()) {
node.removeProperty("x"); node.removeProperty("x");
node.removeProperty("y"); node.removeProperty("y");
...@@ -342,7 +343,7 @@ void resetZ(const SelectionContext &selectionState) ...@@ -342,7 +343,7 @@ void resetZ(const SelectionContext &selectionState)
if (!selectionState.view()) if (!selectionState.view())
return; return;
RewriterTransaction transaction(selectionState.view()); RewriterTransaction transaction(selectionState.view(), QByteArrayLiteral("DesignerActionManager|resetZ"));
foreach (ModelNode node, selectionState.selectedModelNodes()) { foreach (ModelNode node, selectionState.selectedModelNodes()) {
node.removeProperty("z"); node.removeProperty("z");
} }
...@@ -373,7 +374,7 @@ void anchorsFill(const SelectionContext &selectionState) ...@@ -373,7 +374,7 @@ void anchorsFill(const SelectionContext &selectionState)
if (!selectionState.view()) if (!selectionState.view())
return; return;
RewriterTransaction transaction(selectionState.view()); RewriterTransaction transaction(selectionState.view(), QByteArrayLiteral("DesignerActionManager|anchorsFill"));
ModelNode modelNode = selectionState.currentSingleSelectedNode(); ModelNode modelNode = selectionState.currentSingleSelectedNode();
...@@ -392,7 +393,7 @@ void anchorsReset(const SelectionContext &selectionState) ...@@ -392,7 +393,7 @@ void anchorsReset(const SelectionContext &selectionState)
if (!selectionState.view()) if (!selectionState.view())
return; return;
RewriterTransaction transaction(selectionState.view()); RewriterTransaction transaction(selectionState.view(), QByteArrayLiteral("DesignerActionManager|anchorsReset"));
ModelNode modelNode = selectionState.currentSingleSelectedNode(); ModelNode modelNode = selectionState.currentSingleSelectedNode();
...@@ -458,7 +459,7 @@ static void layoutHelperFunction(const SelectionContext &selectionContext, ...@@ -458,7 +459,7 @@ static void layoutHelperFunction(const SelectionContext &selectionContext,
ModelNode layoutNode; ModelNode layoutNode;
{ {
RewriterTransaction transaction(selectionContext.view()); RewriterTransaction transaction(selectionContext.view(), QByteArrayLiteral("DesignerActionManager|layoutHelperFunction1"));
QmlItemNode parentNode = qmlItemNode.instanceParentItem(); QmlItemNode parentNode = qmlItemNode.instanceParentItem();
...@@ -470,7 +471,7 @@ static void layoutHelperFunction(const SelectionContext &selectionContext, ...@@ -470,7 +471,7 @@ static void layoutHelperFunction(const SelectionContext &selectionContext,
} }
{ {
RewriterTransaction transaction(selectionContext.view()); RewriterTransaction transaction(selectionContext.view(), QByteArrayLiteral("DesignerActionManager|layoutHelperFunction2"));
QList<ModelNode> sortedSelectedNodes = selectionContext.selectedModelNodes(); QList<ModelNode> sortedSelectedNodes = selectionContext.selectedModelNodes();
qSort(sortedSelectedNodes.begin(), sortedSelectedNodes.end(), lessThan); qSort(sortedSelectedNodes.begin(), sortedSelectedNodes.end(), lessThan);
......
...@@ -321,7 +321,7 @@ void DragTool::dragEnterEvent(QGraphicsSceneDragDropEvent * event) ...@@ -321,7 +321,7 @@ void DragTool::dragEnterEvent(QGraphicsSceneDragDropEvent * event)
if (!m_rewriterTransaction.isValid()) { if (!m_rewriterTransaction.isValid()) {
view()->clearSelectedModelNodes(); view()->clearSelectedModelNodes();
m_rewriterTransaction = view()->beginRewriterTransaction(); m_rewriterTransaction = view()->beginRewriterTransaction(QByteArrayLiteral("DragTool::dragEnterEvent"));
} }
} }
} }
......
...@@ -159,7 +159,7 @@ void MoveManipulator::begin(const QPointF &beginPoint) ...@@ -159,7 +159,7 @@ void MoveManipulator::begin(const QPointF &beginPoint)
// setOpacityForAllElements(0.62); // setOpacityForAllElements(0.62);
m_rewriterTransaction = m_view->beginRewriterTransaction(); m_rewriterTransaction = m_view->beginRewriterTransaction(QByteArrayLiteral("MoveManipulator::begin"));
} }
...@@ -421,7 +421,7 @@ void MoveManipulator::moveBy(double deltaX, double deltaY) ...@@ -421,7 +421,7 @@ void MoveManipulator::moveBy(double deltaX, double deltaY)
void MoveManipulator::beginRewriterTransaction() void MoveManipulator::beginRewriterTransaction()
{ {
m_rewriterTransaction = m_view->beginRewriterTransaction(); m_rewriterTransaction = m_view->beginRewriterTransaction(QByteArrayLiteral("MoveManipulator::beginRewriterTransaction"));
} }
void MoveManipulator::endRewriterTransaction() void MoveManipulator::endRewriterTransaction()
......
...@@ -81,7 +81,7 @@ void ResizeManipulator::begin(const QPointF &/*beginPoint*/) ...@@ -81,7 +81,7 @@ void ResizeManipulator::begin(const QPointF &/*beginPoint*/)
m_beginFromSceneToContentItemTransform = m_beginFromContentItemToSceneTransform.inverted(); m_beginFromSceneToContentItemTransform = m_beginFromContentItemToSceneTransform.inverted();
m_beginFromItemToSceneTransform = m_resizeController.formEditorItem()->qmlItemNode().instanceSceneTransform(); m_beginFromItemToSceneTransform = m_resizeController.formEditorItem()->qmlItemNode().instanceSceneTransform();
m_beginToParentTransform = m_resizeController.formEditorItem()->qmlItemNode().instanceTransform(); m_beginToParentTransform = m_resizeController.formEditorItem()->qmlItemNode().instanceTransform();
m_rewriterTransaction = m_view->beginRewriterTransaction(); m_rewriterTransaction = m_view->beginRewriterTransaction(QByteArrayLiteral("ResizeManipulator::begin"));
m_snapper.updateSnappingLines(m_resizeController.formEditorItem()); m_snapper.updateSnappingLines(m_resizeController.formEditorItem());
m_beginBottomRightPoint = m_beginToParentTransform.map(m_resizeController.formEditorItem()->qmlItemNode().instanceBoundingRect().bottomRight()); m_beginBottomRightPoint = m_beginToParentTransform.map(m_resizeController.formEditorItem()->qmlItemNode().instanceBoundingRect().bottomRight());
......
...@@ -356,7 +356,7 @@ void DesignDocument::deleteSelected() ...@@ -356,7 +356,7 @@ void DesignDocument::deleteSelected()
return; return;
try { try {
RewriterTransaction transaction(rewriterView()); RewriterTransaction transaction(rewriterView(), QByteArrayLiteral("DesignDocument::deleteSelected"));
QList<ModelNode> toDelete = view()->selectedModelNodes(); QList<ModelNode> toDelete = view()->selectedModelNodes();
foreach (ModelNode node, toDelete) { foreach (ModelNode node, toDelete) {
if (node.isValid() && !node.isRootNode() && QmlObjectNode::isValidQmlObjectNode(node)) if (node.isValid() && !node.isRootNode() && QmlObjectNode::isValidQmlObjectNode(node))
...@@ -511,7 +511,7 @@ void DesignDocument::paste() ...@@ -511,7 +511,7 @@ void DesignDocument::paste()
QList<ModelNode> pastedNodeList; QList<ModelNode> pastedNodeList;
try { try {
RewriterTransaction transaction(rewriterView()); RewriterTransaction transaction(rewriterView(), QByteArrayLiteral("DesignDocument::paste1"));
int offset = double(qrand()) / RAND_MAX * 20 - 10; int offset = double(qrand()) / RAND_MAX * 20 - 10;
...@@ -529,7 +529,7 @@ void DesignDocument::paste() ...@@ -529,7 +529,7 @@ void DesignDocument::paste()
} }
} else { } else {
try { try {
RewriterTransaction transaction(rewriterView()); RewriterTransaction transaction(rewriterView(), QByteArrayLiteral("DesignDocument::paste2"));
pasteModel->detachView(&view); pasteModel->detachView(&view);
currentModel()->attachView(&view); currentModel()->attachView(&view);
......
...@@ -510,7 +510,7 @@ void NavigatorTreeModel::moveNodesInteractive(NodeAbstractProperty parentPropert ...@@ -510,7 +510,7 @@ void NavigatorTreeModel::moveNodesInteractive(NodeAbstractProperty parentPropert
try { try {
TypeName propertyQmlType = qmlTypeInQtContainer(parentProperty.parentModelNode().metaInfo().propertyTypeName(parentProperty.name())); TypeName propertyQmlType = qmlTypeInQtContainer(parentProperty.parentModelNode().metaInfo().propertyTypeName(parentProperty.name()));
RewriterTransaction transaction = m_view->beginRewriterTransaction(); RewriterTransaction transaction = m_view->beginRewriterTransaction(QByteArrayLiteral("NavigatorTreeModel::moveNodesInteractive"));
foreach (const ModelNode &node, modelNodes) { foreach (const ModelNode &node, modelNodes) {
if (!node.isValid()) if (!node.isValid())
continue; continue;
......
...@@ -131,7 +131,7 @@ void GradientLineQmlAdaptor::writeGradient() ...@@ -131,7 +131,7 @@ void GradientLineQmlAdaptor::writeGradient()
ModelNode gradientNode= modelNode.view()->createModelNode("QtQuick.Gradient", modelNode.view()->majorQtQuickVersion(), 0); ModelNode gradientNode= modelNode.view()->createModelNode("QtQuick.Gradient", modelNode.view()->majorQtQuickVersion(), 0);
modelNode.nodeProperty(gradientName().toUtf8()).reparentHere(gradientNode); modelNode.nodeProperty(gradientName().toUtf8()).reparentHere(gradientNode);
RewriterTransaction transaction = m_itemNode.modelNode().view()->beginRewriterTransaction(); RewriterTransaction transaction = m_itemNode.modelNode().view()->beginRewriterTransaction(QByteArrayLiteral("GradientLineQmlAdaptor::writeGradient"));
if (!oldId.isNull()) if (!oldId.isNull())
gradientNode.setId(oldId); gradientNode.setId(oldId);
...@@ -173,7 +173,7 @@ void GradientLineQmlAdaptor::deleteGradient() ...@@ -173,7 +173,7 @@ void GradientLineQmlAdaptor::deleteGradient()
if (m_itemNode.isInBaseState()) { if (m_itemNode.isInBaseState()) {
if (modelNode.hasProperty(gradientName().toUtf8())) { if (modelNode.hasProperty(gradientName().toUtf8())) {
RewriterTransaction transaction = m_itemNode.modelNode().view()->beginRewriterTransaction(); RewriterTransaction transaction = m_itemNode.modelNode().view()->beginRewriterTransaction(QByteArrayLiteral("GradientLineQmlAdaptor::deleteGradient"));
ModelNode gradientNode = modelNode.nodeProperty(gradientName().toUtf8()).modelNode(); ModelNode gradientNode = modelNode.nodeProperty(gradientName().toUtf8()).modelNode();
if (QmlObjectNode(gradientNode).isValid()) if (QmlObjectNode(gradientNode).isValid())
QmlObjectNode(gradientNode).destroy(); QmlObjectNode(gradientNode).destroy();
......
...@@ -143,7 +143,7 @@ void GradientModel::addGradient() ...@@ -143,7 +143,7 @@ void GradientModel::addGradient()
if (!color.isValid()) if (!color.isValid())
color = QColor(Qt::white); color = QColor(Qt::white);
QmlDesigner::RewriterTransaction transaction = m_itemNode.modelNode().view()->beginRewriterTransaction(); QmlDesigner::RewriterTransaction transaction = m_itemNode.modelNode().view()->beginRewriterTransaction(QByteArrayLiteral("GradientModel::addGradient"));
QmlDesigner::ModelNode gradientNode = QmlDesigner::ModelNode gradientNode =
m_itemNode.modelNode().view()->createModelNode("QtQuick.Gradient", m_itemNode.modelNode().view()->createModelNode("QtQuick.Gradient",
...@@ -227,7 +227,7 @@ qreal GradientModel::getPosition(int index) const ...@@ -227,7 +227,7 @@ qreal GradientModel::getPosition(int index) const
void GradientModel::removeStop(int index) void GradientModel::removeStop(int index)
{ {
if (index < rowCount() - 1 && index != 0) { if (index < rowCount() - 1 && index != 0) {
QmlDesigner::RewriterTransaction transaction = m_itemNode.modelNode().view()->beginRewriterTransaction(); QmlDesigner::RewriterTransaction transaction = m_itemNode.modelNode().view()->beginRewriterTransaction(QByteArrayLiteral("GradientModel::removeStop"));
QmlDesigner::ModelNode gradientNode = m_itemNode.modelNode().nodeProperty(gradientPropertyName().toUtf8()).modelNode(); QmlDesigner::ModelNode gradientNode = m_itemNode.modelNode().nodeProperty(gradientPropertyName().toUtf8()).modelNode();
QmlDesigner::QmlObjectNode stop = gradientNode.nodeListProperty("stops").toModelNodeList().at(index); QmlDesigner::QmlObjectNode stop = gradientNode.nodeListProperty("stops").toModelNodeList().at(index);
if (stop.isValid()) { if (stop.isValid()) {
...@@ -251,7 +251,7 @@ void GradientModel::deleteGradient() ...@@ -251,7 +251,7 @@ void GradientModel::deleteGradient()
if (m_itemNode.isInBaseState()) { if (m_itemNode.isInBaseState()) {
if (modelNode.hasProperty(gradientPropertyName().toUtf8())) { if (modelNode.hasProperty(gradientPropertyName().toUtf8())) {
QmlDesigner::RewriterTransaction transaction = m_itemNode.modelNode().view()->beginRewriterTransaction(); QmlDesigner::RewriterTransaction transaction = m_itemNode.modelNode().view()->beginRewriterTransaction(QByteArrayLiteral("GradientModel::deleteGradient"));
QmlDesigner::ModelNode gradientNode = modelNode.nodeProperty(gradientPropertyName().toUtf8()).modelNode(); QmlDesigner::ModelNode gradientNode = modelNode.nodeProperty(gradientPropertyName().toUtf8()).modelNode();
if (QmlDesigner::QmlObjectNode(gradientNode).isValid()) if (QmlDesigner::QmlObjectNode(gradientNode).isValid())
QmlDesigner::QmlObjectNode(gradientNode).destroy(); QmlDesigner::QmlObjectNode(gradientNode).destroy();
......
...@@ -44,7 +44,7 @@ void PropertyEditorTransaction::start() ...@@ -44,7 +44,7 @@ void PropertyEditorTransaction::start()
return; return;
if (m_rewriterTransaction.isValid()) if (m_rewriterTransaction.isValid())
m_rewriterTransaction.commit(); m_rewriterTransaction.commit();
m_rewriterTransaction = m_propertyEditor->beginRewriterTransaction(); m_rewriterTransaction = m_propertyEditor->beginRewriterTransaction(QByteArrayLiteral("PropertyEditorTransaction::start"));
m_timerId = startTimer(4000); m_timerId = startTimer(4000);
} }
......
...@@ -240,7 +240,7 @@ void PropertyEditorView::changeExpression(const QString &propertyName) ...@@ -240,7 +240,7 @@ void PropertyEditorView::changeExpression(const QString &propertyName)
if (m_locked) if (m_locked)
return; return;
RewriterTransaction transaction = beginRewriterTransaction(); RewriterTransaction transaction = beginRewriterTransaction(QByteArrayLiteral("PropertyEditorView::changeExpression"));
try { try {
PropertyName underscoreName(name); PropertyName underscoreName(name);
......
...@@ -268,7 +268,7 @@ void QmlAnchorBindingProxy::setTopTarget(const QString &target) ...@@ -268,7 +268,7 @@ void QmlAnchorBindingProxy::setTopTarget(const QString &target)
if (!newTarget.isValid()) if (!newTarget.isValid())
return; return;
RewriterTransaction transaction = m_qmlItemNode.modelNode().view()->beginRewriterTransaction(); RewriterTransaction transaction = m_qmlItemNode.modelNode().view()->beginRewriterTransaction(QByteArrayLiteral("QmlAnchorBindingProxy::setTopTarget"));
m_topTarget = newTarget; m_topTarget = newTarget;
calcTopMargin(); calcTopMargin();
...@@ -293,7 +293,7 @@ void QmlAnchorBindingProxy::setBottomTarget(const QString &target) ...@@ -293,7 +293,7 @@ void QmlAnchorBindingProxy::setBottomTarget(const QString &target)
if (!newTarget.isValid()) if (!newTarget.isValid())
return; return;
RewriterTransaction transaction = m_qmlItemNode.modelNode().view()->beginRewriterTransaction(); RewriterTransaction transaction = m_qmlItemNode.modelNode().view()->beginRewriterTransaction(QByteArrayLiteral("QmlAnchorBindingProxy::setBottomTarget"));
m_bottomTarget = newTarget; m_bottomTarget = newTarget;
calcBottomMargin(); calcBottomMargin();
...@@ -314,7 +314,7 @@ void QmlAnchorBindingProxy::setLeftTarget(const QString &target) ...@@ -314,7 +314,7 @@ void QmlAnchorBindingProxy::setLeftTarget(const QString &target)
if (!newTarget.isValid()) if (!newTarget.isValid())
return; return;
RewriterTransaction transaction = m_qmlItemNode.modelNode().view()->beginRewriterTransaction(); RewriterTransaction transaction = m_qmlItemNode.modelNode().view()->beginRewriterTransaction(QByteArrayLiteral("QmlAnchorBindingProxy::setLeftTarget"));
m_leftTarget = newTarget; m_leftTarget = newTarget;
calcLeftMargin(); calcLeftMargin();
...@@ -335,7 +335,7 @@ void QmlAnchorBindingProxy::setRightTarget(const QString &target) ...@@ -335,7 +335,7 @@ void QmlAnchorBindingProxy::setRightTarget(const QString &target)
if (!newTarget.isValid()) if (!newTarget.isValid())
return; return;
RewriterTransaction transaction = m_qmlItemNode.modelNode().view()->beginRewriterTransaction(); RewriterTransaction transaction = m_qmlItemNode.modelNode().view()->beginRewriterTransaction(QByteArrayLiteral("QmlAnchorBindingProxy::setRightTarget"));
m_rightTarget = newTarget; m_rightTarget = newTarget;
calcRightMargin(); calcRightMargin();
...@@ -356,7 +356,7 @@ void QmlAnchorBindingProxy::setVerticalTarget(const QString &target) ...@@ -356,7 +356,7 @@ void QmlAnchorBindingProxy::setVerticalTarget(const QString &target)
if (!newTarget.isValid()) if (!newTarget.isValid())
return; return;
RewriterTransaction transaction = m_qmlItemNode.modelNode().view()->beginRewriterTransaction(); RewriterTransaction transaction = m_qmlItemNode.modelNode().view()->beginRewriterTransaction(QByteArrayLiteral("QmlAnchorBindingProxy::setVerticalTarget"));
m_verticalTarget = newTarget; m_verticalTarget = newTarget;
m_qmlItemNode.anchors().setAnchor(AnchorLine::VerticalCenter, m_verticalTarget, AnchorLine::VerticalCenter); m_qmlItemNode.anchors().setAnchor(AnchorLine::VerticalCenter, m_verticalTarget, AnchorLine::VerticalCenter);
...@@ -377,7 +377,7 @@ void QmlAnchorBindingProxy::setHorizontalTarget(const QString &target) ...@@ -377,7 +377,7 @@ void QmlAnchorBindingProxy::setHorizontalTarget(const QString &target)
if (!newTarget.isValid()) if (!newTarget.isValid())
return; return;
RewriterTransaction transaction = m_qmlItemNode.modelNode().view()->beginRewriterTransaction(); RewriterTransaction transaction = m_qmlItemNode.modelNode().view()->beginRewriterTransaction(QByteArrayLiteral("QmlAnchorBindingProxy::setHorizontalTarget"));
m_horizontalTarget = newTarget; m_horizontalTarget = newTarget;
m_qmlItemNode.anchors().setAnchor(AnchorLine::HorizontalCenter, m_horizontalTarget, AnchorLine::HorizontalCenter); m_qmlItemNode.anchors().setAnchor(AnchorLine::HorizontalCenter, m_horizontalTarget, AnchorLine::HorizontalCenter);
...@@ -421,7 +421,7 @@ int QmlAnchorBindingProxy::indexOfPossibleTargetItem(const QString &targetName) ...@@ -421,7 +421,7 @@ int QmlAnchorBindingProxy::indexOfPossibleTargetItem(const QString &targetName)
} }
void QmlAnchorBindingProxy::resetLayout() { void QmlAnchorBindingProxy::resetLayout() {
RewriterTransaction transaction = m_qmlItemNode.modelNode().view()->beginRewriterTransaction(); RewriterTransaction transaction = m_qmlItemNode.modelNode().view()->beginRewriterTransaction(QByteArrayLiteral("QmlAnchorBindingProxy::resetLayout"));
m_qmlItemNode.anchors().removeAnchors(); m_qmlItemNode.anchors().removeAnchors();
m_qmlItemNode.anchors().removeMargins(); m_qmlItemNode.anchors().removeMargins();
...@@ -446,7 +446,7 @@ void QmlAnchorBindingProxy::setBottomAnchor(bool anchor) ...@@ -446,7 +446,7 @@ void QmlAnchorBindingProxy::setBottomAnchor(bool anchor)
if (bottomAnchored() == anchor) if (bottomAnchored() == anchor)
return; return;
RewriterTransaction transaction = m_qmlItemNode.modelNode().view()->beginRewriterTransaction(); RewriterTransaction transaction = m_qmlItemNode.modelNode().view()->beginRewriterTransaction(QByteArrayLiteral("QmlAnchorBindingProxy::setBottomAnchor"));
if (!anchor) { if (!anchor) {
removeBottomAnchor(); removeBottomAnchor();
...@@ -469,7 +469,7 @@ void QmlAnchorBindingProxy::setLeftAnchor(bool anchor) ...@@ -469,7 +469,7 @@ void QmlAnchorBindingProxy::setLeftAnchor(bool anchor)
if (leftAnchored() == anchor) if (leftAnchored() == anchor)
return; return;
RewriterTransaction transaction = m_qmlItemNode.modelNode().view()->beginRewriterTransaction(); RewriterTransaction transaction = m_qmlItemNode.modelNode().view()->beginRewriterTransaction(QByteArrayLiteral("QmlAnchorBindingProxy::setLeftAnchor"));
if (!anchor) { if (!anchor) {
removeLeftAnchor(); removeLeftAnchor();
...@@ -493,7 +493,7 @@ void QmlAnchorBindingProxy::setRightAnchor(bool anchor) ...@@ -493,7 +493,7 @@ void QmlAnchorBindingProxy::setRightAnchor(bool anchor)
if (rightAnchored() == anchor) if (rightAnchored() == anchor)
return; return;
RewriterTransaction transaction = m_qmlItemNode.modelNode().view()->beginRewriterTransaction(); RewriterTransaction transaction = m_qmlItemNode.modelNode().view()->beginRewriterTransaction(QByteArrayLiteral("QmlAnchorBindingProxy::setRightAnchor"));
if (!anchor) { if (!anchor) {
removeRightAnchor(); removeRightAnchor();
...@@ -634,7 +634,7 @@ void QmlAnchorBindingProxy::setTopAnchor(bool anchor) ...@@ -634,7 +634,7 @@ void QmlAnchorBindingProxy::setTopAnchor(bool anchor)
if (topAnchored() == anchor) if (topAnchored() == anchor)
return; return;
RewriterTransaction transaction = m_qmlItemNode.modelNode().view()->beginRewriterTransaction(); RewriterTransaction transaction = m_qmlItemNode.modelNode().view()->beginRewriterTransaction(QByteArrayLiteral("QmlAnchorBindingProxy::setTopAnchor"));
if (!anchor) { if (!anchor) {
removeTopAnchor(); removeTopAnchor();
...@@ -650,7 +650,7 @@ void QmlAnchorBindingProxy::setTopAnchor(bool anchor) ...@@ -650,7 +650,7 @@ void QmlAnchorBindingProxy::setTopAnchor(bool anchor)
} }
void QmlAnchorBindingProxy::removeTopAnchor() { void QmlAnchorBindingProxy::removeTopAnchor() {
RewriterTransaction transaction = m_qmlItemNode.modelNode().view()->beginRewriterTransaction(); RewriterTransaction transaction = m_qmlItemNode.modelNode().view()->beginRewriterTransaction(QByteArrayLiteral("QmlAnchorBindingProxy::removeTopAnchor"));
m_qmlItemNode.anchors().removeAnchor(AnchorLine::Top); m_qmlItemNode.anchors().removeAnchor(AnchorLine::Top);
m_qmlItemNode.anchors().removeMargin(AnchorLine::Top); m_qmlItemNode.anchors().removeMargin(AnchorLine::Top);
...@@ -661,7 +661,7 @@ void QmlAnchorBindingProxy::removeTopAnchor() { ...@@ -661,7 +661,7 @@ void QmlAnchorBindingProxy::removeTopAnchor() {
} }
void QmlAnchorBindingProxy::removeBottomAnchor() { void QmlAnchorBindingProxy::removeBottomAnchor() {
RewriterTransaction transaction = m_qmlItemNode.modelNode().view()->beginRewriterTransaction(); RewriterTransaction transaction = m_qmlItemNode.modelNode().view()->beginRewriterTransaction(QByteArrayLiteral("QmlAnchorBindingProxy::removeBottomAnchor"));
m_qmlItemNode.anchors().removeAnchor(AnchorLine::Bottom); m_qmlItemNode.anchors().removeAnchor(AnchorLine::Bottom);
m_qmlItemNode.anchors().removeMargin(AnchorLine::Bottom); m_qmlItemNode.anchors().removeMargin(AnchorLine::Bottom);
...@@ -671,7 +671,7 @@ void QmlAnchorBindingProxy::removeBottomAnchor() { ...@@ -671,7 +671,7 @@ void QmlAnchorBindingProxy::removeBottomAnchor() {
} }
void QmlAnchorBindingProxy::removeLeftAnchor() { void QmlAnchorBindingProxy::removeLeftAnchor() {
RewriterTransaction transaction = m_qmlItemNode.modelNode().view()->beginRewriterTransaction(); RewriterTransaction transaction = m_qmlItemNode.modelNode().view()->beginRewriterTransaction(QByteArrayLiteral("QmlAnchorBindingProxy::removeLeftAnchor"));
m_qmlItemNode.anchors().removeAnchor(AnchorLine::Left); m_qmlItemNode.anchors().removeAnchor(AnchorLine::Left);
m_qmlItemNode.anchors().removeMargin(AnchorLine::Left); m_qmlItemNode.anchors().removeMargin(AnchorLine::Left);
...@@ -681,7 +681,7 @@ void QmlAnchorBindingProxy::removeLeftAnchor() { ...@@ -681,7 +681,7 @@ void QmlAnchorBindingProxy::removeLeftAnchor() {
} }
void QmlAnchorBindingProxy::removeRightAnchor() { void QmlAnchorBindingProxy::removeRightAnchor() {
RewriterTransaction transaction = m_qmlItemNode.modelNode().view()->beginRewriterTransaction(); RewriterTransaction transaction = m_qmlItemNode.modelNode().view()->beginRewriterTransaction(QByteArrayLiteral("QmlAnchorBindingProxy::removeRightAnchor"));
m_qmlItemNode.anchors().removeAnchor(AnchorLine::Right); m_qmlItemNode.anchors().removeAnchor(AnchorLine::Right);
m_qmlItemNode.anchors().removeMargin(AnchorLine::Right); m_qmlItemNode.anchors().removeMargin(AnchorLine::Right);
...@@ -699,7 +699,7 @@ void QmlAnchorBindingProxy::setVerticalCentered(bool centered) ...@@ -699,7 +699,7 @@ void QmlAnchorBindingProxy::setVerticalCentered(bool centered)
m_locked = true; m_locked = true;
RewriterTransaction transaction = m_qmlItemNode.modelNode().view()->beginRewriterTransaction(); RewriterTransaction transaction = m_qmlItemNode.modelNode().view()->beginRewriterTransaction(QByteArrayLiteral("QmlAnchorBindingProxy::setVerticalCentered"));
if (!centered) { if (!centered) {
m_qmlItemNode.anchors().removeAnchor(AnchorLine::VerticalCenter); m_qmlItemNode.anchors().removeAnchor(AnchorLine::VerticalCenter);
...@@ -723,7 +723,7 @@ void QmlAnchorBindingProxy::setHorizontalCentered(bool centered) ...@@ -723,7 +723,7 @@ void QmlAnchorBindingProxy::setHorizontalCentered(bool centered)
m_locked = true; m_locked = true;
RewriterTransaction transaction = m_qmlItemNode.modelNode().view()->beginRewriterTransaction(); RewriterTransaction transaction = m_qmlItemNode.modelNode().view()->beginRewriterTransaction(QByteArrayLiteral("QmlAnchorBindingProxy::setHorizontalCentered"));
if (!centered) { if (!centered) {
m_qmlItemNode.anchors().removeAnchor(AnchorLine::HorizontalCenter); m_qmlItemNode.anchors().removeAnchor(AnchorLine::HorizontalCenter);
...@@ -780,7 +780,7 @@ bool QmlAnchorBindingProxy::horizontalCentered() ...@@ -780,7 +780,7 @@ bool QmlAnchorBindingProxy::horizontalCentered()
void QmlAnchorBindingProxy::fill() void QmlAnchorBindingProxy::fill()
{ {
RewriterTransaction transaction = m_qmlItemNode.modelNode().view()->beginRewriterTransaction(); RewriterTransaction transaction = m_qmlItemNode.modelNode().view()->beginRewriterTransaction(QByteArrayLiteral("QmlAnchorBindingProxy::fill"));
backupPropertyAndRemove(modelNode(), "x"); backupPropertyAndRemove(modelNode(), "x");
......
...@@ -132,7 +132,7 @@ public: ...@@ -132,7 +132,7 @@ public:
Model* model() const; Model* model() const;
bool isAttached() const; bool isAttached() const;