Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.15.2, 6.0.0
-
-
06d819cd714542427ed9f70820b84004c874a9db e337ba277beb6d08dbb9ca78e74d6cc22f56e3b6 8784a2778063cf928b27a908f6580ed37cb4035d b7412dc86608207cba84538cb962e4300dfe42c1
Description
The following code snippet does not work correctly when running it with the code pre-compiled with qmlcachegen:
import QtQuick 2.0 import QtQuick.Window 2.1 Window { width: 800 height: 600 visible: true signal sig(string arg) onSig: { print("SIG", arg); var arg = "bar"; } Component.onCompleted: { sig("foo"); } }
$ qmlcachegen sig.qml -o sig.qmlc $ qml sig.qml qml: SIG undefined $ QML_DISABLE_DISK_CACHE=1 qml sig.qml qml: SIG foo
The behavior is correct when disk cache is disabled.
Commenting the 'var arg = "bar"' line fixes the issue, but leaving it seems to prevent the code from resolving the signal parameter "arg" when executing the function.
Attachments
Issue Links
- relates to
-
QTBUG-73064 deprecate context properties in QML
- Open