forked from qt-creator/qt-creator
Don't allocate unneeded temporary containers
Fix clazy warnings: allocating an unneeded temporary container [clazy-container-anti-pattern] Change-Id: I4b4c2c634eea650bbdf3c12d982a17f899fc94ec Reviewed-by: Alessandro Portale <alessandro.portale@qt.io> Reviewed-by: David Schulz <david.schulz@qt.io> Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -262,12 +262,12 @@ ModelNode TransitionEditorView::addNewTransition()
|
||||
transition.validId();
|
||||
root.nodeListProperty("transitions").reparentHere(transition);
|
||||
|
||||
for (const QString &id : idPropertyList.keys()) {
|
||||
for (auto it = idPropertyList.cbegin(); it != idPropertyList.cend(); ++it) {
|
||||
ModelNode parallelAnimation = createModelNode("QtQuick.ParallelAnimation",
|
||||
2,
|
||||
12);
|
||||
transition.defaultNodeAbstractProperty().reparentHere(parallelAnimation);
|
||||
for (const QString &property : idPropertyList.value(id)) {
|
||||
for (const QString &property : it.value()) {
|
||||
ModelNode sequentialAnimation
|
||||
= createModelNode("QtQuick.SequentialAnimation", 2, 12);
|
||||
parallelAnimation.defaultNodeAbstractProperty().reparentHere(
|
||||
@@ -285,7 +285,7 @@ ModelNode TransitionEditorView::addNewTransition()
|
||||
12,
|
||||
{{"property", property},
|
||||
{"duration", 150}});
|
||||
propertyAnimation.bindingProperty("target").setExpression(id);
|
||||
propertyAnimation.bindingProperty("target").setExpression(it.key());
|
||||
sequentialAnimation.defaultNodeAbstractProperty().reparentHere(
|
||||
propertyAnimation);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user