forked from qt-creator/qt-creator
QmlDesigner: Reorder code to improve hits
isQtQuickState() is expensive. So isBaseState should be called first. Which is quite probable anyway. Change-Id: I86661c42f8d4ddffa9f0af75aa75ea083c7c9ba4 Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
@@ -297,7 +297,7 @@ bool QmlModelState::isValidQmlModelState(const ModelNode &modelNode, SL sl)
|
||||
keyValue("caller location", sl)};
|
||||
|
||||
return isValidQmlModelNodeFacade(modelNode)
|
||||
&& (modelNode.metaInfo().isQtQuickState() || isBaseState(modelNode));
|
||||
&& (isBaseState(modelNode) || modelNode.metaInfo().isQtQuickState());
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user