6#include <private/qqmlmetatype_p.h>
8#include <QtCore/qdebug.h>
9#include <QtCore/qsequentialiterable.h>
10#include <QtCore/qstringlist.h>
11#include <QtCore/qurl.h>
36 if (variantsType == QMetaType::fromType<QJSValue>()) {
46 if (variantsType == QMetaType::fromType<QStringList>()) {
56 if (variantsType == QMetaType::fromType<QVariantList>()) {
72 if (variantsType == QMetaType::fromType<QQmlListReference>()) {
82 if (
int i = 0; [&](){
bool ok =
false;
i =
v.toInt(&
ok);
return ok;}()) {
91 const int upperLimit = 100 * 1000 * 1000;
94 qWarning(
"Model size of %d is less than 0",
i);
100 qWarning(
"Model size of %d is bigger than the upper limit %d",
i, upperLimit);
111 if (
type.isSequentialContainer()) {
112 m_metaSequence =
type.listMetaSequence();
120 QMetaType::fromType<QSequentialIterable>(), &iterable)) {
125 m_metaSequence = sequence;
136 d = std::move(variantList);
154 return reinterpret_cast<const QList<QUrl> *
>(d.
constData())->
size();
160 return reinterpret_cast<const QList<QObject *> *
>(d.
constData())->
size();
170 return *
reinterpret_cast<const int *
>(d.
constData());
174 Q_UNREACHABLE_RETURN(0);
200 if (valueMetaType == QMetaType::fromType<QVariant>()) {
228 (*
static_cast<QList<QUrl> *
>(d.
data()))[idx] =
value.value<
QUrl>();
236 (*
static_cast<QList<QObject *> *
>(d.
data()))[idx] =
value.value<
QObject *>();
245 if (valueMetaType == QMetaType::fromType<QVariant>()) {
247 }
else if (valueMetaType ==
value.metaType()) {
251 converted.
convert(valueMetaType);
The QJSValue class acts as a container for Qt/JavaScript data types.
void push_back(parameter_type t)
QVariant at(qsizetype) const
void set(qsizetype, const QVariant &)
void setList(const QVariant &)
The QQmlListReference class allows the manipulation of QQmlListProperty properties.
QObject * at(qsizetype) const
Returns the list element at index, or 0 if the operation failed.
The QSequentialIterable class is an iterable interface for a container in a QVariant.
const_iterator constBegin() const noexcept
void * data()
Returns a pointer to the contained object as a generic void* that can be written to.
bool convert(QMetaType type)
Casts the variant to the requested type, targetType.
bool isValid() const
Returns true if the storage type of this variant is not QMetaType::UnknownType; otherwise returns fal...
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 >
QMetaType metaType() const
const void * constData() const
QSet< QString >::iterator it
Combined button and popup list for selecting options.
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
GLsizei const GLfloat * v
[13]
GLenum GLuint GLintptr GLsizeiptr size
[1]
static QVariant toVariant(const QV4::Value &value, QMetaType typeHint, JSToQVariantConversionBehavior conversionBehavior, V4ObjectSet *visitedObjects)