28class QQmlDelayedCallQueue :
public QObject
32 QQmlDelayedCallQueue();
33 ~QQmlDelayedCallQueue() override;
35 void init(QV4::ExecutionEngine *);
37 static QV4::ReturnedValue addUniquelyAndExecuteLater(QV4::ExecutionEngine *engine,
38 QQmlV4FunctionPtr args);
44 struct DelayedFunctionCall
46 DelayedFunctionCall() {}
47 DelayedFunctionCall(QV4::PersistentValue function)
48 : m_function(function), m_guarded(
false) { }
50 void execute(QV4::ExecutionEngine *engine)
const;
52 QV4::PersistentValue m_function;
53 QV4::PersistentValue m_args;
54 QQmlGuard<QObject> m_objectGuard;
58 void storeAnyArguments(DelayedFunctionCall& dfc, QQmlV4FunctionPtr args,
int offset, QV4::ExecutionEngine *engine);
59 void executeAllExpired_Later();
61 QV4::ExecutionEngine *m_engine;
62 QList<DelayedFunctionCall> m_delayedFunctionCalls;
63 QMetaMethod m_tickedMethod;
64 bool m_callbackOutstanding;