cleanup
This commit is contained in:
parent
7a83dda059
commit
15a48e6723
@ -41,6 +41,7 @@ checkbox.setObjectName("check");
|
||||
checkbox.setChecked(true);
|
||||
checkbox.addEventListener(QCheckBoxEvents.toggled, () => {
|
||||
console.log("checkbox was toggled!");
|
||||
label1.setInlineStyle("color: green;");
|
||||
});
|
||||
|
||||
const dial = new QDial();
|
||||
|
||||
@ -8,13 +8,16 @@
|
||||
called.
|
||||
This is required inorder to make the timers work nicely due to merger of event loops
|
||||
*/
|
||||
function wrapWithActivateUvLoop(func: any) {
|
||||
return function() {
|
||||
(process as any).activateUvLoop();
|
||||
//@ts-ignore
|
||||
return func.apply(this, arguments);
|
||||
|
||||
const noop = () => {};
|
||||
|
||||
const wrapWithActivateUvLoop = (func: Function) => {
|
||||
return (...args: any[]) => {
|
||||
const activateUvLoop = (process as any).activateUvLoop || noop;
|
||||
activateUvLoop();
|
||||
return func(...args);
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
const main = () => {
|
||||
process.nextTick = wrapWithActivateUvLoop(process.nextTick);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user