Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
5.6.3, 5.7.1, 5.9.3, 5.10.0
-
None
-
Tested on:
Bug: Linux 5.9.3, 5.10,SailfishOS 5.6.3, iOS 5.7.1
Works: Windows 5.5.1
Description
I think that example is self explanatory. getTmp1Value function is called twice during property initialization phase. It seems a regression - on Qt < 5.6 it works as expected - called once
import QtQuick 2.0 QtObject { property int tmp0: tmp1 + 1 property int tmp1: getTmp1Value() function getTmp1Value() { console.log("getTmp1Value should be called only once"); return 1; } }
I emphasize that changing order of properties fixes the bug:
property int tmp1: getTmp1Value() property int tmp0: tmp1 + 1
Attachments
Issue Links
- duplicates
-
QTBUG-60746 Double-Initialisation of values upon QObject creation
- Closed
- is required for
-
QTBUG-63067 Performance and memory consumption improvements for QtQml
- Closed
- relates to
-
QTBUG-60427 QML setter being entered multiple times.
- Closed