Commit e8c4c395 authored by Kai Uwe Broulik's avatar Kai Uwe Broulik 🍇

Use Qt.callLater instead of creating a Timer

Differential Revision: https://phabricator.kde.org/D8744
parent b985b743
......@@ -75,9 +75,9 @@ Kicker.SubMenu {
}
function delayedDestroy() {
var timer = Qt.createQmlObject('import QtQuick 2.0; Timer { onTriggered: itemDialog.destroy() }', itemDialog);
timer.interval = 0;
timer.start();
Qt.callLater(function() {
itemDialog.destroy();
});
}
......
......@@ -118,9 +118,9 @@ Folder.SubDialog {
}
function delayedDestroy() {
var timer = Qt.createQmlObject('import QtQuick 2.0; Timer { onTriggered: itemDialog.destroy() }', itemDialog);
timer.interval = 0;
timer.start();
Qt.callLater(function() {
itemDialog.destroy();
});
}
Component.onDestruction: {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment