diff options
author | Michael Brasser <michael.brasser@nokia.com> | 2009-09-07 00:17:53 (GMT) |
---|---|---|
committer | Michael Brasser <michael.brasser@nokia.com> | 2009-09-07 00:17:53 (GMT) |
commit | 3c9ee8213a8ac283b596d93d10365a2e928199f8 (patch) | |
tree | 2db3a576148d1f5c9166b59272aafb0e5cf98fa0 /src/declarative/qml | |
parent | d86df44da9c0771a7f6aa3dc7ea0dff95c3dd73c (diff) | |
download | Qt-3c9ee8213a8ac283b596d93d10365a2e928199f8.zip Qt-3c9ee8213a8ac283b596d93d10365a2e928199f8.tar.gz Qt-3c9ee8213a8ac283b596d93d10365a2e928199f8.tar.bz2 |
Fix warnings.
Diffstat (limited to 'src/declarative/qml')
-rw-r--r-- | src/declarative/qml/qmlengine.cpp | 16 | ||||
-rw-r--r-- | src/declarative/qml/qmlengine_p.h | 3 |
2 files changed, 8 insertions, 11 deletions
diff --git a/src/declarative/qml/qmlengine.cpp b/src/declarative/qml/qmlengine.cpp index a31d014..6d3506c 100644 --- a/src/declarative/qml/qmlengine.cpp +++ b/src/declarative/qml/qmlengine.cpp @@ -274,14 +274,10 @@ QmlEnginePrivate::queryContext(const QString &propName, uint *id, return rv; } -QScriptValue -QmlEnginePrivate::propertyContext(const QScriptString &name, - QmlContext *bindContext, - uint id) +QScriptValue QmlEnginePrivate::propertyContext(const QScriptString &name, uint id) { Q_ASSERT(id == resolveData.safetyCheckId); - if (resolveData.type || resolveData.ns) { QmlTypeNameBridge tnb = { resolveData.object, @@ -1096,11 +1092,10 @@ QScriptValue QmlContextScriptClass::property(const QScriptValue &object, const QScriptString &name, uint id) { - QmlContext *bindContext = - static_cast<QmlContext*>(object.data().toQObject()); + Q_UNUSED(object); QmlEnginePrivate *ep = QmlEnginePrivate::get(engine); - return ep->propertyContext(name, bindContext, id); + return ep->propertyContext(name, id); } void QmlContextScriptClass::setProperty(QScriptValue &object, @@ -1108,6 +1103,7 @@ void QmlContextScriptClass::setProperty(QScriptValue &object, uint id, const QScriptValue &value) { + Q_UNUSED(object); Q_UNUSED(name); QmlEnginePrivate::get(engine)->setPropertyContext(value, id); @@ -1128,6 +1124,8 @@ QmlTypeNameScriptClass::queryProperty(const QScriptValue &scriptObject, const QScriptString &name, QueryFlags flags, uint *id) { + Q_UNUSED(flags); + QmlTypeNameBridge bridge = qvariant_cast<QmlTypeNameBridge>(scriptObject.data().toVariant()); @@ -1283,7 +1281,7 @@ QScriptValue QmlObjectToString(QScriptContext *context, QScriptEngine *engine) ret += QLatin1String("\""); ret += obj->objectName(); ret += QLatin1String("\" "); - ret += obj->metaObject()->className(); + ret += QLatin1String(obj->metaObject()->className()); ret += QLatin1String("(0x"); ret += QString::number((quintptr)obj,16); ret += QLatin1String(")"); diff --git a/src/declarative/qml/qmlengine_p.h b/src/declarative/qml/qmlengine_p.h index f492ccb..15ab40d 100644 --- a/src/declarative/qml/qmlengine_p.h +++ b/src/declarative/qml/qmlengine_p.h @@ -100,8 +100,7 @@ public: QScriptClass::QueryFlags queryContext(const QString &name, uint *id, QmlContext *); - QScriptValue propertyContext(const QScriptString &propName, QmlContext *, - uint id); + QScriptValue propertyContext(const QScriptString &propName, uint id); void setPropertyContext(const QScriptValue &, uint id); QScriptClass::QueryFlags queryObject(const QString &name, uint *id, QObject *); |