summaryrefslogtreecommitdiffstats
path: root/src
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
parenta5e66c8c02db19a26fcb8378a1d61302ad2d2c5f (diff)
downloadQt-a59291393cc70a1f922e4796efbb72b29920da27.zip
Qt-a59291393cc70a1f922e4796efbb72b29920da27.tar.gz
Qt-a59291393cc70a1f922e4796efbb72b29920da27.tar.bz2
less compile warnings
Diffstat (limited to 'src')
-rw-r--r--src/declarative/qml/qmlcontextscriptclass.cpp1
-rw-r--r--src/declarative/qml/qmlglobalscriptclass.cpp19
-rw-r--r--src/declarative/qml/qmllistscriptclass.cpp15
3 files changed, 21 insertions, 14 deletions
diff --git a/src/declarative/qml/qmlcontextscriptclass.cpp b/src/declarative/qml/qmlcontextscriptclass.cpp
index 4615764..fda284a 100644
--- a/src/declarative/qml/qmlcontextscriptclass.cpp
+++ b/src/declarative/qml/qmlcontextscriptclass.cpp
@@ -219,6 +219,7 @@ QScriptValue QmlContextScriptClass::property(Object *object, const Identifier &n
void QmlContextScriptClass::setProperty(Object *object, const Identifier &name,
const QScriptValue &value)
{
+ Q_UNUSED(object);
Q_ASSERT(lastScopeObject || lastDefaultObject != -1);
QmlContext *bindContext = lastContext;
diff --git a/src/declarative/qml/qmlglobalscriptclass.cpp b/src/declarative/qml/qmlglobalscriptclass.cpp
index a9c5d3d..fd270e3 100644
--- a/src/declarative/qml/qmlglobalscriptclass.cpp
+++ b/src/declarative/qml/qmlglobalscriptclass.cpp
@@ -70,10 +70,10 @@ QmlGlobalScriptClass::queryProperty(const QScriptValue &object,
const QScriptString &name,
QueryFlags flags, uint *id)
{
- Q_UNUSED(object)
- Q_UNUSED(name)
- Q_UNUSED(flags)
- Q_UNUSED(id)
+ Q_UNUSED(object);
+ Q_UNUSED(name);
+ Q_UNUSED(flags);
+ Q_UNUSED(id);
return HandlesReadAccess | HandlesWriteAccess;
}
@@ -82,9 +82,9 @@ QmlGlobalScriptClass::property(const QScriptValue &object,
const QScriptString &name,
uint id)
{
- Q_UNUSED(object)
- Q_UNUSED(name)
- Q_UNUSED(id)
+ Q_UNUSED(object);
+ Q_UNUSED(name);
+ Q_UNUSED(id);
return engine()->undefinedValue();
}
@@ -92,8 +92,9 @@ void QmlGlobalScriptClass::setProperty(QScriptValue &object,
const QScriptString &name,
uint id, const QScriptValue &value)
{
- Q_UNUSED(object)
- Q_UNUSED(value)
+ Q_UNUSED(object);
+ Q_UNUSED(id);
+ Q_UNUSED(value);
QString error = QLatin1String("Invalid write to global property \"") +
name.toString() + QLatin1String("\"");
engine()->currentContext()->throwError(error);
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));