summaryrefslogtreecommitdiffstats
path: root/src/declarative/qml/qmllistscriptclass.cpp
diff options
context:
space:
mode:
authorYann Bodson <yann.bodson@nokia.com>2009-11-04 05:32:26 (GMT)
committerYann Bodson <yann.bodson@nokia.com>2009-11-04 05:32:26 (GMT)
commita59291393cc70a1f922e4796efbb72b29920da27 (patch)
tree10597812c9583b5bd4e13682991a66e469481360 /src/declarative/qml/qmllistscriptclass.cpp
parenta5e66c8c02db19a26fcb8378a1d61302ad2d2c5f (diff)
downloadQt-a59291393cc70a1f922e4796efbb72b29920da27.zip
Qt-a59291393cc70a1f922e4796efbb72b29920da27.tar.gz
Qt-a59291393cc70a1f922e4796efbb72b29920da27.tar.bz2
less compile warnings
Diffstat (limited to 'src/declarative/qml/qmllistscriptclass.cpp')
-rw-r--r--src/declarative/qml/qmllistscriptclass.cpp15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/declarative/qml/qmllistscriptclass.cpp b/src/declarative/qml/qmllistscriptclass.cpp
index f067db6..a180e49 100644
--- a/src/declarative/qml/qmllistscriptclass.cpp
+++ b/src/declarative/qml/qmllistscriptclass.cpp
@@ -54,6 +54,7 @@ QmlListScriptClass::QmlListScriptClass(QmlEngine *e)
: QScriptDeclarativeClass(QmlEnginePrivate::getScriptEngine(e)), engine(e)
{
QScriptEngine *scriptEngine = QmlEnginePrivate::getScriptEngine(engine);
+ Q_UNUSED(scriptEngine);
m_lengthId = createPersistentIdentifier(QLatin1String("length"));
}
@@ -81,6 +82,8 @@ QScriptClass::QueryFlags
QmlListScriptClass::queryProperty(Object *object, const Identifier &name,
QScriptClass::QueryFlags flags)
{
+ Q_UNUSED(object);
+ Q_UNUSED(flags);
if (name == m_lengthId.identifier)
return QScriptClass::HandlesReadAccess;
@@ -115,9 +118,11 @@ QScriptValue QmlListScriptClass::property(Object *obj, const Identifier &name)
if (data->type == QListPtr) {
const QList<QObject *> &qlist = *((QList<QObject *>*)list);
- if (name == m_lengthId.identifier)
- return qlist.count();
- else if (lastIndex < qlist.count())
+ quint32 count = qlist.count();
+
+ if (name == m_lengthId.identifier)
+ return count;
+ else if (lastIndex < count)
return enginePriv->objectClass->newQObject(qlist.at(lastIndex));
else
return scriptEngine->undefinedValue();
@@ -126,9 +131,9 @@ QScriptValue QmlListScriptClass::property(Object *obj, const Identifier &name)
Q_ASSERT(data->type == QmlListPtr);
const QmlList<QObject *> &qmllist = *((QmlList<QObject *>*)list);
- int count = qmllist.count();
+ quint32 count = qmllist.count();
- if (name == m_lengthId.identifier)
+ if (name == m_lengthId.identifier)
return count;
else if (lastIndex < count)
return enginePriv->objectClass->newQObject(qmllist.at(lastIndex));