Fix JavaScript signal connect on alias without other handlers
authorSimon Hausmann <simon.hausmann@digia.com>
Thu, 28 Nov 2013 15:57:41 +0000 (16:57 +0100)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Fri, 29 Nov 2013 07:19:11 +0000 (08:19 +0100)
commit55b5e30901cd2616d729c61856dabe3bfda5e4f0
treef98f90b01f4bc17e72bf0b515e78a7f2d970222e
parent612785f39e325b0578be89e09b0e32d7d08d471e
Fix JavaScript signal connect on alias without other handlers

The changed handlers for aliases are connected lazily in the engine.
QQmlPropertyPrivate::flushSignal is responsible for that and called in other
places, for example when installing a onSomeAliasPropertyChanged handler.
However we were missing a call to flushSignal when doing
onSomeAliasPropertyChanged.connect(...), i.e. using the JavaScript connect API.

Task-number: QTBUG-30493
Change-Id: Ia3f008626fd7af3f2cfbdd30d13fb83158bed4d5
Reviewed-by: Albert Astals Cid <albert.astals@canonical.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
src/qml/jsruntime/qv4qobjectwrapper.cpp
tests/auto/qml/qqmlecmascript/data/signalHandlers.qml
tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp