[REF] qweb: improve generated code in some cases

This commit is contained in:
Géry Debongnie
2019-09-12 09:39:15 +02:00
parent 471fd49063
commit 9b589af75a
6 changed files with 142 additions and 278 deletions
+4 -8
View File
@@ -7,7 +7,6 @@ exports[`animations t-transition combined with component 1`] = `
let QWeb = this.constructor;
let parent = context;
let owner = context;
let result;
var h = this.h;
let c1 = [], p1 = {key:1};
var vn1 = h('div', p1, c1);
@@ -42,7 +41,7 @@ exports[`animations t-transition combined with component 1`] = `
def3 = def3.then(()=>{if (w4.__owl__.isDestroyed) {return};let pvnode=w4.__owl__.pvnode;c1[_2_index]=pvnode;});
}
extra.promises.push(def3);
return result;
return vn1;
}"
`;
@@ -53,7 +52,6 @@ exports[`animations t-transition combined with t-component and t-if 1`] = `
let QWeb = this.constructor;
let parent = context;
let owner = context;
let result;
var h = this.h;
let c1 = [], p1 = {key:1};
var vn1 = h('div', p1, c1);
@@ -90,7 +88,7 @@ exports[`animations t-transition combined with t-component and t-if 1`] = `
}
extra.promises.push(def3);
}
return result;
return vn1;
}"
`;
@@ -98,7 +96,6 @@ exports[`animations t-transition with no delay/duration 1`] = `
"function anonymous(context,extra
) {
let utils = this.constructor.utils;
let result;
var h = this.h;
let c1 = [], p1 = {key:1};
var vn1 = h('span', p1, c1);
@@ -112,7 +109,7 @@ exports[`animations t-transition with no delay/duration 1`] = `
},
};
c1.push({text: \`blue\`});
return result;
return vn1;
}"
`;
@@ -120,7 +117,6 @@ exports[`animations t-transition, on a simple node (insert) 1`] = `
"function anonymous(context,extra
) {
let utils = this.constructor.utils;
let result;
var h = this.h;
let c1 = [], p1 = {key:1};
var vn1 = h('span', p1, c1);
@@ -134,6 +130,6 @@ exports[`animations t-transition, on a simple node (insert) 1`] = `
},
};
c1.push({text: \`blue\`});
return result;
return vn1;
}"
`;