6#include <QtQml/qqmlinfo.h>
8#include <private/qqmllist_p.h>
10#include <private/qv4arrayiterator_p.h>
11#include <private/qv4arrayobject_p.h>
12#include <private/qv4functionobject_p.h>
13#include <private/qv4objectiterator_p.h>
14#include <private/qv4objectproto_p.h>
15#include <private/qv4qobjectwrapper_p.h>
16#include <private/qv4symbol_p.h>
29 o->setArrayType(Heap::ArrayData::Custom);
45 m_object.init(
object);
46 m_propertyType = propertyType.
iface();
57 m_object.init(
object);
58 m_propertyType = propertyType.
iface();
74 if (!
object || propId == -1)
112 if (
id.isArrayIndex()) {
115 ?
w->d()->property()->count(
w->d()->property())
147 if (
id.isArrayIndex()) {
156 if (
value.isNull()) {
185 quint32 count =
w->d()->property()->count ?
w->d()->property()->count(
w->d()->property()) : 0;
186 if (arrayIndex <
count) {
193 w->engine(),
w->d()->property()->at(
w->d()->property(),
index));
196 }
else if (memberIndex == 0) {
198 return o->engine()->id_length()->propertyKey();
216 defineDefaultProperty(
QStringLiteral(
"splice"), method_splice, 2);
217 defineDefaultProperty(
QStringLiteral(
"unshift"), method_unshift, 1);
218 defineDefaultProperty(
QStringLiteral(
"indexOf"), method_indexOf, 1);
219 defineDefaultProperty(
QStringLiteral(
"lastIndexOf"), method_lastIndexOf, 1);
252 return result->asReturnedValue();
271 for (
int i = 0;
i < argc; ++
i) {
281 for (
int i = 0;
i < argc; ++
i) {
282 if (argv[
i].isNull())
283 property->append(
property,
nullptr);
285 property->append(
property, argv[
i].as<QV4::QObjectWrapper>()->
object());
288 const auto actualLength =
property->count(
property);
289 if (actualLength !=
length + argc)
326 return result->asReturnedValue();
356 }
else if (argc > 1){
357 itemCount = argc - 2;
362 if (itemCount > deleteCount
363 &&
len > std::numeric_limits<qsizetype>::max() - itemCount + deleteCount) {
374 const auto arg = argv[
i + 2];
380 newArray->arrayReserve(deleteCount);
386 newArray->setArrayLengthUnchecked(deleteCount);
395 if (itemCount < deleteCount) {
400 }
else if (itemCount > deleteCount) {
401 for (
qsizetype k = 0; k < itemCount - deleteCount; ++k)
410 const auto arg = argv[
i + 2];
445 for (
int i = 0;
i < argc; ++
i) {
446 const auto arg = argv[
i];
451 for (
int i = 0;
i < argc; ++
i)
459 for (
int i = 0;
i < argc; ++
i) {
467template<
typename Iterate>
477 if (argv[0].isNull()) {
478 searchValue =
nullptr;
482 searchValue =
wrapper->object();
510 b, thisObject, argv, argc,
540 b, thisObject, argv, argc,
646 if (newLength == 0 &&
property->clear) {
The QQmlListProperty class allows applications to expose list-like properties of QObject-derived clas...
static QQmlListReference init(const QQmlListProperty< QObject > &, QMetaType)
The QQmlListReference class allows the manipulation of QQmlListProperty properties.
static QString fromLatin1(QByteArrayView ba)
This is an overloaded member function, provided for convenience. It differs from the above function o...
ObjectType::Data * allocate(Args &&... args)
static auto fromValue(T &&value) noexcept(std::is_nothrow_copy_constructible_v< T > &&Private::CanUseInternalSpace< T >) -> std::enable_if_t< std::conjunction_v< std::is_copy_constructible< T >, std::is_destructible< T > >, QVariant >
Combined button and popup list for selecting options.
\qmltype Particle \inqmlmodule QtQuick.Particles
void sortHelper(RandomAccessIterator start, RandomAccessIterator end, LessThan lessThan)
static QV4::ReturnedValue method_set_length(const FunctionObject *f, const Value *thisObject, const Value *argv, int argc)
static QV4::ReturnedValue method_get_length(const FunctionObject *b, const Value *thisObject, const Value *, int)
bool hasExceptionOrIsInterrupted(ExecutionEngine *engine)
static struct AttrInfo attrs[]
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
constexpr const T & qMin(const T &a, const T &b)
constexpr const T & qMax(const T &a, const T &b)
QList< QObject * > QObjectList
GLboolean GLboolean GLboolean b
GLsizei const GLfloat * v
[13]
GLfloat GLfloat GLfloat w
[0]
GLboolean GLboolean GLboolean GLboolean a
[7]
GLenum GLuint GLenum GLsizei length
GLenum GLenum GLsizei count
Q_QML_EXPORT QQmlInfo qmlWarning(const QObject *me)
static void setCustomArrayData(Heap::QmlListWrapper *d)
ReturnedValue firstOrLastIndexOf(const FunctionObject *b, const Value *thisObject, const Value *argv, int argc, Iterate iterate)
QtPrivate::QRegularExpressionMatchIteratorRangeBasedForIterator begin(const QRegularExpressionMatchIterator &iterator)
#define QStringLiteral(str)
static bool lessThan(const QChar *a, int l, const char *c)
QT_BEGIN_NAMESPACE bool qIsAtMostUintLimit(qsizetype length, uint limit=std::numeric_limits< uint >::max())
#define THROW_TYPE_ERROR()
#define RETURN_UNDEFINED()
#define DEFINE_OBJECT_VTABLE(classname)
static constexpr ReturnedValue undefined()
static constexpr ReturnedValue null()
MemoryManager * memoryManager
ReturnedValue throwRangeError(const Value &value)
Heap::ArrayObject * newArrayObject(int count=0)
ReturnedValue throwTypeError()
const QQmlListProperty< QObject > * property() const
void init(QMetaType propertyType)
QMetaType propertyType() const
ExecutionEngine * engine() const
bool hasProperty(PropertyKey id) const
static PropertyKey invalid()
static PropertyKey fromArrayIndex(uint idx)
static ReturnedValue method_push(const FunctionObject *, const Value *thisObject, const Value *argv, int argc)
static ReturnedValue method_splice(const FunctionObject *, const Value *thisObject, const Value *argv, int argc)
static ReturnedValue method_sort(const FunctionObject *, const Value *thisObject, const Value *argv, int argc)
static ReturnedValue method_set_length(const FunctionObject *, const Value *thisObject, const Value *argv, int argc)
static ReturnedValue method_get_length(const FunctionObject *, const Value *thisObject, const Value *argv, int argc)
static ReturnedValue method_pop(const FunctionObject *, const Value *thisObject, const Value *argv, int argc)
static ReturnedValue method_unshift(const FunctionObject *, const Value *thisObject, const Value *argv, int argc)
static ReturnedValue method_indexOf(const FunctionObject *, const Value *thisObject, const Value *argv, int argc)
static ReturnedValue method_lastIndexOf(const FunctionObject *, const Value *thisObject, const Value *argv, int argc)
static ReturnedValue method_shift(const FunctionObject *, const Value *thisObject, const Value *argv, int argc)
static ReturnedValue wrap(ExecutionEngine *engine, QObject *object)
static V4_NEEDS_DESTROY ReturnedValue create(ExecutionEngine *engine, QObject *object, int propId, QMetaType propType)
QQmlListReference toListReference() const
QVariant toVariant() const
QML_NEARLY_ALWAYS_INLINE ReturnedValue asReturnedValue() const
constexpr ReturnedValue asReturnedValue() const
static constexpr VTable::OwnPropertyKeys virtualOwnPropertyKeys
static constexpr VTable::Get virtualGet
static constexpr VTable::GetLength virtualGetLength
static constexpr VTable::Put virtualPut
bool isFunctionObject() const
static constexpr Value undefinedValue()
uint asArrayLength(bool *ok) const
Heap::Object * toObject(ExecutionEngine *e) const
PropertyKey next(const Object *o, Property *pd=nullptr, PropertyAttributes *attrs=nullptr) override
~QmlListWrapperOwnPropertyKeyIterator() override=default