aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2015-03-07 14:35:47 -0800
committerThiago Macieira <thiago.macieira@intel.com>2015-07-09 00:12:37 +0000
commitf35be0bc5afe940bb95695a319176e45fec1f594 (patch)
treef6e610550a3efbbaea02b177c8fab526416e1515
parentf558bc48585c69de36151248c969a484a969ebb4 (diff)
QtQml: Fix const correctness in old style casts
Found with GCC's -Wcast-qual. Change-Id: Ia0aac2f09e9245339951ffff13c958364a2e9859 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
-rw-r--r--src/qml/animations/qabstractanimationjob.cpp2
-rw-r--r--src/qml/animations/qcontinuinganimationgroupjob.cpp2
-rw-r--r--src/qml/animations/qparallelanimationgroupjob.cpp2
-rw-r--r--src/qml/animations/qpauseanimationjob.cpp2
-rw-r--r--src/qml/animations/qsequentialanimationgroupjob.cpp2
-rw-r--r--src/qml/jsruntime/qv4engine.cpp4
-rw-r--r--src/qml/jsruntime/qv4serialize.cpp10
-rw-r--r--src/qml/jsruntime/qv4typedarray.cpp12
-rw-r--r--src/qml/jsruntime/qv4vme_moth.cpp8
-rw-r--r--src/qml/qml/ftw/qbitfield_p.h11
-rw-r--r--src/qml/qml/ftw/qhashedstring_p.h4
-rw-r--r--src/qml/qml/qqmlcontext.cpp2
-rw-r--r--src/qml/qml/qqmlengine.cpp2
-rw-r--r--src/qml/qml/qqmlmetatype.cpp2
-rw-r--r--src/qml/qml/qqmlproperty.cpp10
-rw-r--r--src/qml/qml/qqmlpropertycache.cpp2
-rw-r--r--src/qml/qml/qqmlvaluetype.cpp2
-rw-r--r--src/qml/qml/qqmlvmemetaobject.cpp4
-rw-r--r--src/qml/qml/qqmlvmemetaobject_p.h2
-rw-r--r--src/qml/util/qqmllistaccessor.cpp4
20 files changed, 45 insertions, 44 deletions
diff --git a/src/qml/animations/qabstractanimationjob.cpp b/src/qml/animations/qabstractanimationjob.cpp
index 7fcf383bcb..d301c43822 100644
--- a/src/qml/animations/qabstractanimationjob.cpp
+++ b/src/qml/animations/qabstractanimationjob.cpp
@@ -652,7 +652,7 @@ void QAbstractAnimationJob::removeAnimationChangeListener(QAnimationJobChangeLis
void QAbstractAnimationJob::debugAnimation(QDebug d) const
{
- d << "AbstractAnimationJob(" << hex << (void *) this << dec << ") state:"
+ d << "AbstractAnimationJob(" << hex << (const void *) this << dec << ") state:"
<< m_state << "duration:" << duration();
}
diff --git a/src/qml/animations/qcontinuinganimationgroupjob.cpp b/src/qml/animations/qcontinuinganimationgroupjob.cpp
index c77448f153..88005baf12 100644
--- a/src/qml/animations/qcontinuinganimationgroupjob.cpp
+++ b/src/qml/animations/qcontinuinganimationgroupjob.cpp
@@ -115,7 +115,7 @@ void QContinuingAnimationGroupJob::uncontrolledAnimationFinished(QAbstractAnimat
void QContinuingAnimationGroupJob::debugAnimation(QDebug d) const
{
- d << "ContinuingAnimationGroupJob(" << hex << (void *) this << dec << ")";
+ d << "ContinuingAnimationGroupJob(" << hex << (const void *) this << dec << ")";
debugChildren(d);
}
diff --git a/src/qml/animations/qparallelanimationgroupjob.cpp b/src/qml/animations/qparallelanimationgroupjob.cpp
index 0153794d6f..fe56f2b1e8 100644
--- a/src/qml/animations/qparallelanimationgroupjob.cpp
+++ b/src/qml/animations/qparallelanimationgroupjob.cpp
@@ -233,7 +233,7 @@ void QParallelAnimationGroupJob::uncontrolledAnimationFinished(QAbstractAnimatio
void QParallelAnimationGroupJob::debugAnimation(QDebug d) const
{
- d << "ParallelAnimationGroupJob(" << hex << (void *) this << dec << ")";
+ d << "ParallelAnimationGroupJob(" << hex << (const void *) this << dec << ")";
debugChildren(d);
}
diff --git a/src/qml/animations/qpauseanimationjob.cpp b/src/qml/animations/qpauseanimationjob.cpp
index 8e35c58999..0e95645f41 100644
--- a/src/qml/animations/qpauseanimationjob.cpp
+++ b/src/qml/animations/qpauseanimationjob.cpp
@@ -62,7 +62,7 @@ void QPauseAnimationJob::updateCurrentTime(int)
void QPauseAnimationJob::debugAnimation(QDebug d) const
{
- d << "PauseAnimationJob(" << hex << (void *) this << dec << ")" << "duration:" << m_duration;
+ d << "PauseAnimationJob(" << hex << (const void *) this << dec << ")" << "duration:" << m_duration;
}
QT_END_NAMESPACE
diff --git a/src/qml/animations/qsequentialanimationgroupjob.cpp b/src/qml/animations/qsequentialanimationgroupjob.cpp
index 5060b7f6cd..b92caf3bc4 100644
--- a/src/qml/animations/qsequentialanimationgroupjob.cpp
+++ b/src/qml/animations/qsequentialanimationgroupjob.cpp
@@ -411,7 +411,7 @@ void QSequentialAnimationGroupJob::animationRemoved(QAbstractAnimationJob *anim,
void QSequentialAnimationGroupJob::debugAnimation(QDebug d) const
{
- d << "SequentialAnimationGroupJob(" << hex << (void *) this << dec << ")" << "currentAnimation:" << (void *)m_currentAnimation;
+ d << "SequentialAnimationGroupJob(" << hex << (const void *) this << dec << ")" << "currentAnimation:" << (void *)m_currentAnimation;
debugChildren(d);
}
diff --git a/src/qml/jsruntime/qv4engine.cpp b/src/qml/jsruntime/qv4engine.cpp
index ba6f5a3b79..2dbdcfc526 100644
--- a/src/qml/jsruntime/qv4engine.cpp
+++ b/src/qml/jsruntime/qv4engine.cpp
@@ -1447,7 +1447,7 @@ QV4::ReturnedValue QV4::ExecutionEngine::fromVariant(const QVariant &variant)
QV4::Scope scope(this);
if (type == qMetaTypeId<QQmlListReference>()) {
typedef QQmlListReferencePrivate QDLRP;
- QDLRP *p = QDLRP::get((QQmlListReference*)ptr);
+ QDLRP *p = QDLRP::get((QQmlListReference*)const_cast<void *>(ptr));
if (p->object) {
return QV4::QmlListWrapper::create(scope.engine, p->property, p->propertyType);
} else {
@@ -1459,7 +1459,7 @@ QV4::ReturnedValue QV4::ExecutionEngine::fromVariant(const QVariant &variant)
} else if (type == qMetaTypeId<QList<QObject *> >()) {
// XXX Can this be made more by using Array as a prototype and implementing
// directly against QList<QObject*>?
- const QList<QObject *> &list = *(QList<QObject *>*)ptr;
+ const QList<QObject *> &list = *(const QList<QObject *>*)ptr;
QV4::ScopedArrayObject a(scope, newArrayObject());
a->arrayReserve(list.count());
QV4::ScopedValue v(scope);
diff --git a/src/qml/jsruntime/qv4serialize.cpp b/src/qml/jsruntime/qv4serialize.cpp
index e669924d4a..31d85df13e 100644
--- a/src/qml/jsruntime/qv4serialize.cpp
+++ b/src/qml/jsruntime/qv4serialize.cpp
@@ -116,21 +116,21 @@ static inline void reserve(QByteArray &data, int extra)
static inline quint32 popUint32(const char *&data)
{
- quint32 rv = *((quint32 *)data);
+ quint32 rv = *((const quint32 *)data);
data += sizeof(quint32);
return rv;
}
static inline double popDouble(const char *&data)
{
- double rv = *((double *)data);
+ double rv = *((const double *)data);
data += sizeof(double);
return rv;
}
static inline void *popPtr(const char *&data)
{
- void *rv = *((void **)data);
+ void *rv = *((void *const *)data);
data += sizeof(void *);
return rv;
}
@@ -297,7 +297,7 @@ ReturnedValue Serialize::deserialize(const char *&data, ExecutionEngine *engine)
case WorkerString:
{
quint32 size = headersize(header);
- QString qstr((QChar *)data, size);
+ QString qstr((const QChar *)data, size);
data += ALIGN(size * sizeof(quint16));
return QV4::Encode(engine->newString(qstr));
}
@@ -342,7 +342,7 @@ ReturnedValue Serialize::deserialize(const char *&data, ExecutionEngine *engine)
{
quint32 flags = headersize(header);
quint32 length = popUint32(data);
- QString pattern = QString((QChar *)data, length - 1);
+ QString pattern = QString((const QChar *)data, length - 1);
data += ALIGN(length * sizeof(quint16));
return Encode(engine->newRegExpObject(pattern, flags));
}
diff --git a/src/qml/jsruntime/qv4typedarray.cpp b/src/qml/jsruntime/qv4typedarray.cpp
index c355207d94..19e541dba8 100644
--- a/src/qml/jsruntime/qv4typedarray.cpp
+++ b/src/qml/jsruntime/qv4typedarray.cpp
@@ -106,7 +106,7 @@ void UInt8ClampedArrayWrite(ExecutionEngine *e, char *data, int index, const Val
ReturnedValue Int16ArrayRead(const char *data, int index)
{
- return Encode((int)*(short *)(data + index));
+ return Encode((int)*(const short *)(data + index));
}
void Int16ArrayWrite(ExecutionEngine *e, char *data, int index, const Value &value)
@@ -119,7 +119,7 @@ void Int16ArrayWrite(ExecutionEngine *e, char *data, int index, const Value &val
ReturnedValue UInt16ArrayRead(const char *data, int index)
{
- return Encode((int)*(unsigned short *)(data + index));
+ return Encode((int)*(const unsigned short *)(data + index));
}
void UInt16ArrayWrite(ExecutionEngine *e, char *data, int index, const Value &value)
@@ -132,7 +132,7 @@ void UInt16ArrayWrite(ExecutionEngine *e, char *data, int index, const Value &va
ReturnedValue Int32ArrayRead(const char *data, int index)
{
- return Encode(*(int *)(data + index));
+ return Encode(*(const int *)(data + index));
}
void Int32ArrayWrite(ExecutionEngine *e, char *data, int index, const Value &value)
@@ -145,7 +145,7 @@ void Int32ArrayWrite(ExecutionEngine *e, char *data, int index, const Value &val
ReturnedValue UInt32ArrayRead(const char *data, int index)
{
- return Encode(*(unsigned int *)(data + index));
+ return Encode(*(const unsigned int *)(data + index));
}
void UInt32ArrayWrite(ExecutionEngine *e, char *data, int index, const Value &value)
@@ -158,7 +158,7 @@ void UInt32ArrayWrite(ExecutionEngine *e, char *data, int index, const Value &va
ReturnedValue Float32ArrayRead(const char *data, int index)
{
- return Encode(*(float *)(data + index));
+ return Encode(*(const float *)(data + index));
}
void Float32ArrayWrite(ExecutionEngine *e, char *data, int index, const Value &value)
@@ -171,7 +171,7 @@ void Float32ArrayWrite(ExecutionEngine *e, char *data, int index, const Value &v
ReturnedValue Float64ArrayRead(const char *data, int index)
{
- return Encode(*(double *)(data + index));
+ return Encode(*(const double *)(data + index));
}
void Float64ArrayWrite(ExecutionEngine *e, char *data, int index, const Value &value)
diff --git a/src/qml/jsruntime/qv4vme_moth.cpp b/src/qml/jsruntime/qv4vme_moth.cpp
index dda5848f0b..390bbf5ee3 100644
--- a/src/qml/jsruntime/qv4vme_moth.cpp
+++ b/src/qml/jsruntime/qv4vme_moth.cpp
@@ -593,7 +593,7 @@ QV4::ReturnedValue VME::run(ExecutionEngine *engine, const uchar *code
MOTH_END_INSTR(CallGlobalLookup)
MOTH_BEGIN_INSTR(SetExceptionHandler)
- exceptionHandler = instr.offset ? ((uchar *)&instr.offset) + instr.offset : 0;
+ exceptionHandler = instr.offset ? ((const uchar *)&instr.offset) + instr.offset : 0;
MOTH_END_INSTR(SetExceptionHandler)
MOTH_BEGIN_INSTR(CallBuiltinThrow)
@@ -727,21 +727,21 @@ QV4::ReturnedValue VME::run(ExecutionEngine *engine, const uchar *code
MOTH_END_INSTR(ConstructGlobalLookup)
MOTH_BEGIN_INSTR(Jump)
- code = ((uchar *)&instr.offset) + instr.offset;
+ code = ((const uchar *)&instr.offset) + instr.offset;
MOTH_END_INSTR(Jump)
MOTH_BEGIN_INSTR(JumpEq)
bool cond = VALUEPTR(instr.condition)->toBoolean();
TRACE(condition, "%s", cond ? "TRUE" : "FALSE");
if (cond)
- code = ((uchar *)&instr.offset) + instr.offset;
+ code = ((const uchar *)&instr.offset) + instr.offset;
MOTH_END_INSTR(JumpEq)
MOTH_BEGIN_INSTR(JumpNe)
bool cond = VALUEPTR(instr.condition)->toBoolean();
TRACE(condition, "%s", cond ? "TRUE" : "FALSE");
if (!cond)
- code = ((uchar *)&instr.offset) + instr.offset;
+ code = ((const uchar *)&instr.offset) + instr.offset;
MOTH_END_INSTR(JumpNe)
MOTH_BEGIN_INSTR(UNot)
diff --git a/src/qml/qml/ftw/qbitfield_p.h b/src/qml/qml/ftw/qbitfield_p.h
index 0b7d507b11..e3b6b0e498 100644
--- a/src/qml/qml/ftw/qbitfield_p.h
+++ b/src/qml/qml/ftw/qbitfield_p.h
@@ -129,15 +129,16 @@ QBitField QBitField::united(const QBitField &o)
rv.bits = max;
rv.ownData = new quint32[length + 1];
*(rv.ownData) = 1;
- rv.data = rv.ownData + 1;
+ quint32 *rvdata;
+ rv.data = rvdata = rv.ownData + 1;
if (bits > o.bits) {
- ::memcpy((quint32 *)rv.data, data, length * sizeof(quint32));
+ ::memcpy(rvdata, data, length * sizeof(quint32));
for (quint32 ii = 0; ii < (o.bits + quint32(31)) / 32; ++ii)
- ((quint32 *)rv.data)[ii] |= o.data[ii];
+ (rvdata)[ii] |= o.data[ii];
} else {
- ::memcpy((quint32 *)rv.data, o.data, length * sizeof(quint32));
+ ::memcpy(rvdata, o.data, length * sizeof(quint32));
for (quint32 ii = 0; ii < (bits + quint32(31)) / 32; ++ii)
- ((quint32 *)rv.data)[ii] |= data[ii];
+ (rvdata)[ii] |= data[ii];
}
return rv;
}
diff --git a/src/qml/qml/ftw/qhashedstring_p.h b/src/qml/qml/ftw/qhashedstring_p.h
index 6ae2e17267..d38fd668f3 100644
--- a/src/qml/qml/ftw/qhashedstring_p.h
+++ b/src/qml/qml/ftw/qhashedstring_p.h
@@ -252,14 +252,14 @@ public:
inline bool equals(const QHashedStringRef &string) const {
return length == string.length() &&
hash == string.hash() &&
- (isQString()?QHashedString::compare(string.constData(), (QChar *)utf16Data(), length):
+ (isQString()?QHashedString::compare(string.constData(), (const QChar *)utf16Data(), length):
QHashedString::compare(string.constData(), cStrData(), length));
}
inline bool equals(const QHashedCStringRef &string) const {
return length == string.length() &&
hash == string.hash() &&
- (isQString()?QHashedString::compare((QChar *)utf16Data(), string.constData(), length):
+ (isQString()?QHashedString::compare((const QChar *)utf16Data(), string.constData(), length):
QHashedString::compare(string.constData(), cStrData(), length));
}
};
diff --git a/src/qml/qml/qqmlcontext.cpp b/src/qml/qml/qqmlcontext.cpp
index f08f650913..fb51bad3a7 100644
--- a/src/qml/qml/qqmlcontext.cpp
+++ b/src/qml/qml/qqmlcontext.cpp
@@ -783,7 +783,7 @@ QString QQmlContextData::findObjectId(const QObject *obj) const
if (publicContext) {
QQmlContextPrivate *p = QQmlContextPrivate::get(publicContext);
for (int ii = 0; ii < p->propertyValues.count(); ++ii)
- if (p->propertyValues.at(ii) == QVariant::fromValue((QObject *)obj))
+ if (p->propertyValues.at(ii) == QVariant::fromValue(const_cast<QObject *>(obj)))
return properties.findId(ii);
}
diff --git a/src/qml/qml/qqmlengine.cpp b/src/qml/qml/qqmlengine.cpp
index 8cf3d2064d..1f27e4ecb3 100644
--- a/src/qml/qml/qqmlengine.cpp
+++ b/src/qml/qml/qqmlengine.cpp
@@ -2228,7 +2228,7 @@ QObject *QQmlEnginePrivate::toQObject(const QVariant &v, bool *ok) const
int t = v.userType();
if (t == QMetaType::QObjectStar || m_compositeTypes.contains(t)) {
if (ok) *ok = true;
- return *(QObject **)(v.constData());
+ return *(QObject *const *)(v.constData());
} else {
return QQmlMetaType::toQObject(v, ok);
}
diff --git a/src/qml/qml/qqmlmetatype.cpp b/src/qml/qml/qqmlmetatype.cpp
index 2f7834fa41..41d44a821a 100644
--- a/src/qml/qml/qqmlmetatype.cpp
+++ b/src/qml/qml/qqmlmetatype.cpp
@@ -1508,7 +1508,7 @@ QObject *QQmlMetaType::toQObject(const QVariant &v, bool *ok)
if (ok) *ok = true;
- return *(QObject **)v.constData();
+ return *(QObject *const *)v.constData();
}
bool QQmlMetaType::isQObject(int userType)
diff --git a/src/qml/qml/qqmlproperty.cpp b/src/qml/qml/qqmlproperty.cpp
index ae452b727e..800f650075 100644
--- a/src/qml/qml/qqmlproperty.cpp
+++ b/src/qml/qml/qqmlproperty.cpp
@@ -1304,12 +1304,12 @@ bool QQmlPropertyPrivate::write(QObject *object,
QMetaObject::metacall(object, QMetaObject::WriteProperty, coreIdx, argv);
} else if (variantType == propertyType) {
- void *a[] = { (void *)value.constData(), 0, &status, &flags };
+ void *a[] = { const_cast<void *>(value.constData()), 0, &status, &flags };
QMetaObject::metacall(object, QMetaObject::WriteProperty, coreIdx, a);
} else if (qMetaTypeId<QVariant>() == propertyType) {
- void *a[] = { (void *)&value, 0, &status, &flags };
+ void *a[] = { const_cast<QVariant *>(&value), 0, &status, &flags };
QMetaObject::metacall(object, QMetaObject::WriteProperty, coreIdx, a);
} else if (property.isQObject()) {
@@ -1319,7 +1319,7 @@ bool QQmlPropertyPrivate::write(QObject *object,
if (valMo.isNull())
return false;
- QObject *o = *(QObject **)value.constData();
+ QObject *o = *(QObject *const *)value.constData();
QQmlMetaObject propMo = rawMetaObjectForType(enginePriv, propertyType);
if (o) valMo = o;
@@ -1465,7 +1465,7 @@ bool QQmlPropertyPrivate::write(QObject *object,
}
if (ok) {
- void *a[] = { (void *)v.constData(), 0, &status, &flags};
+ void *a[] = { const_cast<void *>(v.constData()), 0, &status, &flags};
QMetaObject::metacall(object, QMetaObject::WriteProperty, coreIdx, a);
} else {
return false;
@@ -1603,7 +1603,7 @@ bool QQmlPropertyPrivate::writeBinding(QObject *object,
const char *propertyType = 0;
if (value.userType() == QMetaType::QObjectStar) {
- if (QObject *o = *(QObject **)value.constData()) {
+ if (QObject *o = *(QObject *const *)value.constData()) {
valueType = o->metaObject()->className();
QQmlMetaObject propertyMetaObject = rawMetaObjectForType(QQmlEnginePrivate::get(engine), type);
diff --git a/src/qml/qml/qqmlpropertycache.cpp b/src/qml/qml/qqmlpropertycache.cpp
index dd1f93ec00..0018275b95 100644
--- a/src/qml/qml/qqmlpropertycache.cpp
+++ b/src/qml/qml/qqmlpropertycache.cpp
@@ -271,7 +271,7 @@ QQmlPropertyCache::~QQmlPropertyCache()
stringCache.clear();
if (_parent) _parent->release();
- if (_ownMetaObject) free((void *)_metaObject);
+ if (_ownMetaObject) free(const_cast<QMetaObject *>(_metaObject));
_metaObject = 0;
_parent = 0;
engine = 0;
diff --git a/src/qml/qml/qqmlvaluetype.cpp b/src/qml/qml/qqmlvaluetype.cpp
index b147266080..10eaae0c77 100644
--- a/src/qml/qml/qqmlvaluetype.cpp
+++ b/src/qml/qml/qqmlvaluetype.cpp
@@ -202,7 +202,7 @@ QQmlValueType::~QQmlValueType()
QObjectPrivate *op = QObjectPrivate::get(this);
Q_ASSERT(op->metaObject == this);
op->metaObject = 0;
- ::free((void*)_metaObject);
+ ::free(const_cast<QMetaObject *>(_metaObject));
metaType.destroy(gadgetPtr);
}
diff --git a/src/qml/qml/qqmlvmemetaobject.cpp b/src/qml/qml/qqmlvmemetaobject.cpp
index 5b1be15869..97fc382c33 100644
--- a/src/qml/qml/qqmlvmemetaobject.cpp
+++ b/src/qml/qml/qqmlvmemetaobject.cpp
@@ -772,7 +772,7 @@ int QQmlVMEMetaObject::metaCall(QMetaObject::Call c, int _id, void **a)
int listIndex = data[id].asInt();
const List *list = &listProperties.at(listIndex);
*reinterpret_cast<QQmlListProperty<QObject> *>(a[0]) =
- QQmlListProperty<QObject>(object, (void *)list,
+ QQmlListProperty<QObject>(object, const_cast<List *>(list),
list_append, list_count, list_at,
list_clear);
}
@@ -1090,7 +1090,7 @@ void QQmlVMEMetaObject::writeProperty(int id, const QVariant &value)
} else {
bool needActivate = false;
if (value.userType() == QMetaType::QObjectStar) {
- QObject *o = *(QObject **)value.data();
+ QObject *o = *(QObject *const *)value.data();
needActivate = (data[id].dataType() != QMetaType::QObjectStar || data[id].asQObject() != o);
data[id].setValue(o, this, id);
} else {
diff --git a/src/qml/qml/qqmlvmemetaobject_p.h b/src/qml/qml/qqmlvmemetaobject_p.h
index d0e2e34ff1..f3048d426a 100644
--- a/src/qml/qml/qqmlvmemetaobject_p.h
+++ b/src/qml/qml/qqmlvmemetaobject_p.h
@@ -119,7 +119,7 @@ struct QQmlVMEMetaData
};
PropertyData *propertyData() const {
- return (PropertyData *)(((const char *)this) + sizeof(QQmlVMEMetaData));
+ return (PropertyData *)(((char *)const_cast<QQmlVMEMetaData *>(this)) + sizeof(QQmlVMEMetaData));
}
AliasData *aliasData() const {
diff --git a/src/qml/util/qqmllistaccessor.cpp b/src/qml/util/qqmllistaccessor.cpp
index 55b745ab6d..bebab80d28 100644
--- a/src/qml/util/qqmllistaccessor.cpp
+++ b/src/qml/util/qqmllistaccessor.cpp
@@ -96,7 +96,7 @@ int QQmlListAccessor::count() const
case VariantList:
return qvariant_cast<QVariantList>(d).count();
case ListProperty:
- return ((QQmlListReference *)d.constData())->count();
+ return ((const QQmlListReference *)d.constData())->count();
case Instance:
return 1;
case Integer:
@@ -116,7 +116,7 @@ QVariant QQmlListAccessor::at(int idx) const
case VariantList:
return qvariant_cast<QVariantList>(d).at(idx);
case ListProperty:
- return QVariant::fromValue(((QQmlListReference *)d.constData())->at(idx));
+ return QVariant::fromValue(((const QQmlListReference *)d.constData())->at(idx));
case Instance:
return d;
case Integer: