feat(utils): improve performance of setTimeout

This commit is contained in:
Ronan Abhamon 2017-08-07 12:35:59 +02:00
parent 2a53b6d65c
commit 6b28a34ae7

View file

@ -229,7 +229,7 @@ function qmlTypeof (object, className) {
// delay is in milliseconds. // delay is in milliseconds.
function setTimeout (parent, delay, cb) { function setTimeout (parent, delay, cb) {
var timer = new (function (parent) { var timer = new (function (parent) {
return Qt.createQmlObject('import QtQuick 2.7; Timer { }', parent) return Qt.createQmlObject('import QtQml 2.2; Timer { }', parent)
})(parent) })(parent)
timer.interval = delay timer.interval = delay