Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qqmldelayedcallqueue_p.h
Go to the documentation of this file.
1// Copyright (C) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#ifndef QQMLDELAYEDCALLQUEUE_P_H
5#define QQMLDELAYEDCALLQUEUE_P_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists purely as an
12// implementation detail. This header file may change from version to
13// version without notice, or even be removed.
14//
15// We mean it.
16//
17
18#include <QtCore/qglobal.h>
19#include <QtCore/qobject.h>
20#include <QtCore/qmetaobject.h>
21#include <QtCore/qmetatype.h>
22#include <private/qqmlguard_p.h>
23#include <private/qv4context_p.h>
24
26
28{
30public:
32 ~QQmlDelayedCallQueue() override;
33
35
38
39public Q_SLOTS:
40 void ticked();
41
42private:
43 struct DelayedFunctionCall
44 {
45 DelayedFunctionCall() {}
46 DelayedFunctionCall(QV4::PersistentValue function)
47 : m_function(function), m_guarded(false) { }
48
49 void execute(QV4::ExecutionEngine *engine) const;
50
51 QV4::PersistentValue m_function;
53 QQmlGuard<QObject> m_objectGuard;
54 bool m_guarded;
55 };
56
57 void storeAnyArguments(DelayedFunctionCall& dfc, QQmlV4FunctionPtr args, int offset, QV4::ExecutionEngine *engine);
58 void executeAllExpired_Later();
59
60 QV4::ExecutionEngine *m_engine;
61 QVector<DelayedFunctionCall> m_delayedFunctionCalls;
62 QMetaMethod m_tickedMethod;
63 bool m_callbackOutstanding;
64};
65
67
68#endif // QQMLDELAYEDCALLQUEUE_P_H
\inmodule QtCore
Definition qmetaobject.h:19
\inmodule QtCore
Definition qobject.h:103
static QV4::ReturnedValue addUniquelyAndExecuteLater(QV4::ExecutionEngine *engine, QQmlV4FunctionPtr args)
void init(QV4::ExecutionEngine *)
Combined button and popup list for selecting options.
quint64 ReturnedValue
GLenum GLuint GLintptr offset
#define Q_OBJECT
#define Q_SLOTS
QJSValueList args
QJSEngine engine
[0]