Resolve type names inside guard property of SignalTransition
authorNobuaki Sukegawa <nsukeg@gmail.com>
Sun, 14 Dec 2014 10:31:25 +0000 (19:31 +0900)
committerNobuaki Sukegawa <nsukeg@gmail.com>
Sat, 20 Dec 2014 19:24:03 +0000 (20:24 +0100)
commiteff84a13afaf3e3ab1f3ef28d28e5d20b0145891
treea218ceb40871a9dba1e660741d61d0d8da12902f
parente7b66a60584b3fcb1436a7dbe8396b71cb69fe1b
Resolve type names inside guard property of SignalTransition

SignalTransition's guard is evaluated against ad-hoc QQmlContext because
it needs signal args added to its contextProperty.
Since QQmlContext created this way does not have import type cache, we
could not use type names inside guard.
To avoid this problem, this patch makes guard's context inherit parent's
type cahce.

Change-Id: I4ddd559779681b53d4ee42f4820d05438addb5ac
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
src/imports/statemachine/signaltransition.cpp
tests/auto/qmltest/statemachine/tst_enumguard.qml [new file with mode: 0644]