Advertisement
Guest User

Untitled

a guest
Mar 8th, 2018
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
QML 1.28 KB | None | 0 0
  1.     Item {
  2.         property int tmp0: getTmp0Value(tmp1)
  3.         property int tmp1: getTmp1Value()
  4.  
  5.         function getTmp1Value() {
  6.             console.log("getTmp1Value should be called only once and before getTmp0Value");
  7.             //var timeStart = new Date().getTime();
  8.             //while (new Date().getTime() - timeStart < 2000) {
  9.             //    // Do nothing
  10.             //}
  11.             return 1;
  12.         }
  13.         function getTmp0Value(arg) {
  14.             console.log("getTmp0Value should be called only once and aftere getTmp1Value");
  15.             return arg + 1;
  16.         }
  17.     }
  18.  
  19.     QtObject {
  20.         property int tmp0: {
  21.             print("tmp0 should be evaluated only once and after tmp1");
  22.             return tmp1 + 1;
  23.         }
  24.  
  25.         property int tmp1: {
  26.             print("tmp1 should be evaluated only once and before tmp0");
  27.             return 1;
  28.         }
  29.     }
  30.  
  31. //qml: tmp0 should be evaluated only once and after tmp1
  32. //qml: tmp1 should be evaluated only once and before tmp0
  33. //qml: tmp1 should be evaluated only once and before tmp0
  34.  
  35. //qml: getTmp1Value should be called only once and before getTmp0Value
  36. //qml: getTmp0Value should be called only once and aftere getTmp1Value
  37. //qml: getTmp1Value should be called only once and before getTmp0Value
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement