forked from qt-creator/qt-creator
QmlDesigner: Improve return values
You can return by const reference if you the ownership of the return value is non local. If it is local you should return by value. In that case it should be non const because otherwise the compile cannot move the return value. Change-Id: I2a4b08dd0e67a2c2741a46bdd7def842c1db3fbf Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io> Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
This commit is contained in:
@@ -348,7 +348,7 @@ void TransitionEditorView::openSettingsDialog()
|
||||
dialog->show();
|
||||
}
|
||||
|
||||
const QList<ModelNode> TransitionEditorView::allTransitions() const
|
||||
QList<ModelNode> TransitionEditorView::allTransitions() const
|
||||
{
|
||||
if (rootModelNode().isValid() && rootModelNode().hasProperty("transitions")) {
|
||||
NodeAbstractProperty transitions = rootModelNode().nodeAbstractProperty("transitions");
|
||||
|
||||
Reference in New Issue
Block a user