forked from qt-creator/qt-creator
QmlDesigner: Crash fix
* Add QTC_CHECK for crash * ActionAreas should not be "garbage" collected if they have no target. * Initial ActionAreas do not have a target and ActionAreas without target make sense to a user. We do not want to delete them together with the target. Task-number: QDS-12181 Change-Id: Ie520c47aad990a8ff07fc3346e6772226d334ce5 Reviewed-by: Marco Bubke <marco.bubke@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
@@ -174,6 +174,7 @@ public:
|
||||
ModelNode targetTransition() const;
|
||||
void assignTargetFlowItem(const QmlFlowTargetNode &flowItem);
|
||||
QmlFlowItemNode flowItemParent() const;
|
||||
private:
|
||||
void destroyTarget();
|
||||
};
|
||||
|
||||
|
||||
@@ -515,8 +515,7 @@ struct BindingFilter
|
||||
struct TargetFilter
|
||||
{
|
||||
TargetFilter(NodeDependencies &dependencies, Model *model)
|
||||
: flowViewFlowActionAreaMetaInfo{model->flowViewFlowActionAreaMetaInfo()}
|
||||
, flowViewFlowTransitionMetaInfo{model->flowViewFlowTransitionMetaInfo()}
|
||||
: flowViewFlowTransitionMetaInfo{model->flowViewFlowTransitionMetaInfo()}
|
||||
, qtQuickPropertyChangesMetaInfo{model->qtQuickPropertyChangesMetaInfo()}
|
||||
, qtQuickTimelineKeyframeGroupMetaInfo{model->qtQuickTimelineKeyframeGroupMetaInfo()}
|
||||
, qtQuickPropertyAnimationMetaInfo{model->qtQuickPropertyAnimationMetaInfo()}
|
||||
|
||||
@@ -748,7 +748,6 @@ void QmlFlowActionAreaNode::assignTargetFlowItem(const QmlFlowTargetNode &flowIt
|
||||
|
||||
ModelNode transition = flowView.addTransition(flowParent.modelNode(),
|
||||
flowItem.modelNode());
|
||||
|
||||
modelNode().bindingProperty("target").setExpression(transition.validId());
|
||||
}
|
||||
|
||||
|
||||
@@ -280,7 +280,6 @@ INSTANTIATE_TEST_SUITE_P(
|
||||
ForTarget,
|
||||
testing::Values(TargetData{"QtQuick.Item", "QtQuick.PropertyChanges", "target"},
|
||||
TargetData{"QtQuick.Item", "QtQuick.Timeline.KeyframeGroup", "target"},
|
||||
TargetData{"FlowView.FlowTransition", "FlowView.FlowActionArea", "target"},
|
||||
TargetData{"QtQuick.Item", "QtQuick.PropertyAnimation", "target"},
|
||||
TargetData{"FlowView.FlowItem", "FlowView.FlowTransition", "to"},
|
||||
TargetData{"FlowView.FlowItem", "FlowView.FlowTransition", "from"}));
|
||||
|
||||
Reference in New Issue
Block a user