5#include <private/qqmlengine_p.h>
6#include <private/qqmljavascriptexpression_p.h>
7#include <private/qv4value_p.h>
8#include <private/qv4jscall_p.h>
9#include <private/qv4qobjectwrapper_p.h>
10#include <private/qv4qmlcontext_p.h>
23 (!m_objectGuard.isNull() &&
33 const int argCount =
array ?
array->getLength() : 0;
37 for (
int i = 0;
i < argCount;
i++) {
38 jsCallData.args[
i] =
array->get(
i);
41 callback->call(jsCallData);
43 if (scope.hasException()) {
45 error.setDescription(
error.description() +
QLatin1String(
" (exception occurred during delayed function evaluation)"));
69 int methodIndex =
metaObject.indexOfSlot(
"ticked()");
70 m_tickedMethod =
metaObject.method(methodIndex);
91 if (functionData.second != -1) {
93 iter = self->m_delayedFunctionCalls.
begin();
94 while (
iter != self->m_delayedFunctionCalls.
end()) {
95 DelayedFunctionCall& dfc = *
iter;
97 if (storedFunctionData == functionData) {
104 iter = self->m_delayedFunctionCalls.
begin();
105 while (
iter != self->m_delayedFunctionCalls.
end()) {
106 DelayedFunctionCall& dfc = *
iter;
114 const bool functionAlreadyStored = (
iter != self->m_delayedFunctionCalls.
end());
115 if (functionAlreadyStored) {
116 DelayedFunctionCall dfc = *
iter;
117 self->m_delayedFunctionCalls.
erase(
iter);
118 self->m_delayedFunctionCalls.
append(dfc);
123 DelayedFunctionCall& dfc = self->m_delayedFunctionCalls.
last();
124 if (dfc.m_objectGuard.isNull()) {
125 if (functionData.second != -1) {
128 dfc.m_guarded =
true;
129 }
else if (
func->scope()->type == QV4::Heap::ExecutionContext::Type_QmlContext) {
130 QV4::QmlContext::Data *
g =
static_cast<QV4::QmlContext::Data *
>(
func->scope());
133 dfc.m_guarded =
true;
136 self->storeAnyArguments(dfc,
args, 1,
engine);
138 if (!self->m_callbackOutstanding) {
140 self->m_callbackOutstanding =
true;
160void QQmlDelayedCallQueue::executeAllExpired_Later()
165 m_delayedFunctionCalls.clear();
168 while (
iter != delayedCalls.
end()) {
169 DelayedFunctionCall& dfc = *
iter;
170 dfc.execute(m_engine);
177 m_callbackOutstanding =
false;
178 executeAllExpired_Later();
183#include "moc_qqmldelayedcallqueue_p.cpp"
qsizetype length() const noexcept
static bool wasDeleted(const QObject *)
static QQmlData * get(QObjectPrivate *priv, bool create)
quint32 isQueuedForDeletion
~QQmlDelayedCallQueue() override
static QV4::ReturnedValue addUniquelyAndExecuteLater(QV4::ExecutionEngine *engine, QQmlV4Function *args)
void init(QV4::ExecutionEngine *)
void warning(const QQmlError &)
static QQmlEnginePrivate * get(QQmlEngine *e)
The QQmlError class encapsulates a QML error.
iterator begin()
Returns an \l{STL-style iterators}{STL-style iterator} pointing to the first character in the string.
QString last(qsizetype n) const
iterator end()
Returns an \l{STL-style iterators}{STL-style iterator} pointing just after the last character in the ...
QString & append(QChar c)
iterator erase(const_iterator first, const_iterator last)
Combined button and popup list for selecting options.
std::pair< T1, T2 > QPair
DBusConnection const char DBusError DBusBusType DBusError return DBusConnection DBusHandleMessageFunction void DBusFreeFunction return DBusConnection return DBusConnection return const char DBusError return DBusConnection DBusMessage dbus_uint32_t return DBusConnection dbus_bool_t DBusConnection DBusAddWatchFunction DBusRemoveWatchFunction DBusWatchToggledFunction void DBusFreeFunction return DBusConnection DBusDispatchStatusFunction void DBusFreeFunction DBusTimeout return DBusTimeout return DBusWatch return DBusWatch unsigned int return DBusError const DBusError return const DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessageIter * iter
DBusConnection const char DBusError * error
GLenum GLuint GLenum GLsizei length
GLenum GLuint GLintptr offset
#define THROW_GENERIC_ERROR(str)
obj metaObject() -> className()
static constexpr ReturnedValue undefined()
static QPair< QObject *, int > extractQtMethod(const QV4::FunctionObject *function)
constexpr ReturnedValue asReturnedValue() const