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:
Marco Bubke
2025-05-24 14:39:57 +02:00
parent a92998e841
commit 034fb098bc

View File

@@ -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());
}
/**