diff options
author | Warwick Allison <warwick.allison@nokia.com> | 2010-01-11 05:05:10 (GMT) |
---|---|---|
committer | Warwick Allison <warwick.allison@nokia.com> | 2010-01-11 05:05:10 (GMT) |
commit | 7287f1f01e7000a21f52f463a459fa0285db4cca (patch) | |
tree | 8db949be2f3470d7c06196ba9a8735a051b8abd3 /src/declarative | |
parent | 8c7dfd168d9eb42a75b79d8b448902b0df490419 (diff) | |
parent | 5f890ee9201b7ff05bc0da06265f6ad4212da9c6 (diff) | |
download | Qt-7287f1f01e7000a21f52f463a459fa0285db4cca.zip Qt-7287f1f01e7000a21f52f463a459fa0285db4cca.tar.gz Qt-7287f1f01e7000a21f52f463a459fa0285db4cca.tar.bz2 |
Merge branch 'kinetic-declarativeui' of git@scm.dev.nokia.troll.no:qt/kinetic into kinetic-declarativeui
Diffstat (limited to 'src/declarative')
-rw-r--r-- | src/declarative/qml/qmlcontextscriptclass.cpp | 3 | ||||
-rw-r--r-- | src/declarative/qml/qmlcontextscriptclass_p.h | 2 | ||||
-rw-r--r-- | src/declarative/qml/qmllistscriptclass.cpp | 6 | ||||
-rw-r--r-- | src/declarative/qml/qmllistscriptclass_p.h | 2 | ||||
-rw-r--r-- | src/declarative/qml/qmlmetatype.cpp | 4 | ||||
-rw-r--r-- | src/declarative/qml/qmlobjectscriptclass.cpp | 20 | ||||
-rw-r--r-- | src/declarative/qml/qmlobjectscriptclass_p.h | 4 | ||||
-rw-r--r-- | src/declarative/qml/qmltypenamescriptclass.cpp | 2 | ||||
-rw-r--r-- | src/declarative/qml/qmltypenamescriptclass_p.h | 2 | ||||
-rw-r--r-- | src/declarative/qml/qmlvaluetypescriptclass.cpp | 5 | ||||
-rw-r--r-- | src/declarative/qml/qmlvaluetypescriptclass_p.h | 2 | ||||
-rw-r--r-- | src/declarative/util/qmlstate_p.h | 2 | ||||
-rw-r--r-- | src/declarative/util/qmltransition_p.h | 2 |
13 files changed, 32 insertions, 24 deletions
diff --git a/src/declarative/qml/qmlcontextscriptclass.cpp b/src/declarative/qml/qmlcontextscriptclass.cpp index 588a397..8ab3f8d 100644 --- a/src/declarative/qml/qmlcontextscriptclass.cpp +++ b/src/declarative/qml/qmlcontextscriptclass.cpp @@ -196,7 +196,8 @@ QmlContextScriptClass::queryProperty(QmlContext *bindContext, QObject *scopeObje return 0; } -QScriptValue QmlContextScriptClass::property(Object *object, const Identifier &name) +QmlContextScriptClass::Value +QmlContextScriptClass::property(Object *object, const Identifier &name) { Q_UNUSED(object); diff --git a/src/declarative/qml/qmlcontextscriptclass_p.h b/src/declarative/qml/qmlcontextscriptclass_p.h index a577d52..f652371 100644 --- a/src/declarative/qml/qmlcontextscriptclass_p.h +++ b/src/declarative/qml/qmlcontextscriptclass_p.h @@ -77,7 +77,7 @@ public: protected: virtual QScriptClass::QueryFlags queryProperty(Object *, const Identifier &, QScriptClass::QueryFlags flags); - virtual QScriptValue property(Object *, const Identifier &); + virtual Value property(Object *, const Identifier &); virtual void setProperty(Object *, const Identifier &name, const QScriptValue &); private: diff --git a/src/declarative/qml/qmllistscriptclass.cpp b/src/declarative/qml/qmllistscriptclass.cpp index f5ff2c0..b275625 100644 --- a/src/declarative/qml/qmllistscriptclass.cpp +++ b/src/declarative/qml/qmllistscriptclass.cpp @@ -100,7 +100,7 @@ QmlListScriptClass::queryProperty(Object *object, const Identifier &name, } } -QScriptValue QmlListScriptClass::property(Object *obj, const Identifier &name) +QmlListScriptClass::Value QmlListScriptClass::property(Object *obj, const Identifier &name) { QScriptEngine *scriptEngine = QmlEnginePrivate::getScriptEngine(engine); QmlEnginePrivate *enginePriv = QmlEnginePrivate::get(engine); @@ -123,7 +123,7 @@ QScriptValue QmlListScriptClass::property(Object *obj, const Identifier &name) quint32 count = qlist.count(); if (name == m_lengthId.identifier) - return count; + return Value(scriptEngine, count); else if (lastIndex < count) return enginePriv->objectClass->newQObject(qlist.at(lastIndex)); else @@ -136,7 +136,7 @@ QScriptValue QmlListScriptClass::property(Object *obj, const Identifier &name) quint32 count = qmllist.count(); if (name == m_lengthId.identifier) - return count; + return Value(scriptEngine, count); else if (lastIndex < count) return enginePriv->objectClass->newQObject(qmllist.at(lastIndex)); else diff --git a/src/declarative/qml/qmllistscriptclass_p.h b/src/declarative/qml/qmllistscriptclass_p.h index 0c10472..43ca929 100644 --- a/src/declarative/qml/qmllistscriptclass_p.h +++ b/src/declarative/qml/qmllistscriptclass_p.h @@ -70,7 +70,7 @@ public: protected: virtual QScriptClass::QueryFlags queryProperty(Object *, const Identifier &, QScriptClass::QueryFlags flags); - virtual QScriptValue property(Object *, const Identifier &); + virtual Value property(Object *, const Identifier &); private: PersistentIdentifier m_lengthId; diff --git a/src/declarative/qml/qmlmetatype.cpp b/src/declarative/qml/qmlmetatype.cpp index 0b79a21..d9c007d 100644 --- a/src/declarative/qml/qmlmetatype.cpp +++ b/src/declarative/qml/qmlmetatype.cpp @@ -1102,9 +1102,11 @@ bool QmlMetaType::copy(int type, void *data, const void *copy) case QMetaType::QBitmap: *static_cast<NS(QBitmap) *>(data) = *static_cast<const NS(QBitmap)*>(copy); return true; +#ifndef QT_NO_CURSOR case QMetaType::QCursor: *static_cast<NS(QCursor) *>(data) = *static_cast<const NS(QCursor)*>(copy); return true; +#endif case QMetaType::QSizePolicy: *static_cast<NS(QSizePolicy) *>(data) = *static_cast<const NS(QSizePolicy)*>(copy); return true; @@ -1308,9 +1310,11 @@ bool QmlMetaType::copy(int type, void *data, const void *copy) case QMetaType::QBitmap: *static_cast<NS(QBitmap) *>(data) = NS(QBitmap)(); return true; +#ifndef QT_NO_CURSOR case QMetaType::QCursor: *static_cast<NS(QCursor) *>(data) = NS(QCursor)(); return true; +#endif case QMetaType::QSizePolicy: *static_cast<NS(QSizePolicy) *>(data) = NS(QSizePolicy)(); return true; diff --git a/src/declarative/qml/qmlobjectscriptclass.cpp b/src/declarative/qml/qmlobjectscriptclass.cpp index cb665d1..1023579 100644 --- a/src/declarative/qml/qmlobjectscriptclass.cpp +++ b/src/declarative/qml/qmlobjectscriptclass.cpp @@ -189,12 +189,14 @@ QmlObjectScriptClass::queryProperty(QObject *obj, const Identifier &name, return 0; } -QScriptValue QmlObjectScriptClass::property(Object *object, const Identifier &name) +QmlObjectScriptClass::Value +QmlObjectScriptClass::property(Object *object, const Identifier &name) { return property(toQObject(object), name); } -QScriptValue QmlObjectScriptClass::property(QObject *obj, const Identifier &name) +QmlObjectScriptClass::Value +QmlObjectScriptClass::property(QObject *obj, const Identifier &name) { if (name == m_destroyId.identifier) return m_destroy; @@ -256,37 +258,37 @@ QScriptValue QmlObjectScriptClass::property(QObject *obj, const Identifier &name qreal rv = 0; void *args[] = { &rv, 0 }; QMetaObject::metacall(obj, QMetaObject::ReadProperty, lastData->coreIndex, args); - return QScriptValue(scriptEngine, rv); + return Value(scriptEngine, rv); } else if (lastData->propType == QMetaType::Int) { int rv = 0; void *args[] = { &rv, 0 }; QMetaObject::metacall(obj, QMetaObject::ReadProperty, lastData->coreIndex, args); - return QScriptValue(scriptEngine, rv); + return Value(scriptEngine, rv); } else if (lastData->propType == QMetaType::Bool) { bool rv = false; void *args[] = { &rv, 0 }; QMetaObject::metacall(obj, QMetaObject::ReadProperty, lastData->coreIndex, args); - return QScriptValue(scriptEngine, rv); + return Value(scriptEngine, rv); } else if (lastData->propType == QMetaType::QString) { QString rv; void *args[] = { &rv, 0 }; QMetaObject::metacall(obj, QMetaObject::ReadProperty, lastData->coreIndex, args); - return QScriptValue(scriptEngine, rv); + return Value(scriptEngine, rv); } else if (lastData->propType == QMetaType::UInt) { uint rv = 0; void *args[] = { &rv, 0 }; QMetaObject::metacall(obj, QMetaObject::ReadProperty, lastData->coreIndex, args); - return QScriptValue(scriptEngine, rv); + return Value(scriptEngine, rv); } else if (lastData->propType == QMetaType::Float) { float rv = 0; void *args[] = { &rv, 0 }; QMetaObject::metacall(obj, QMetaObject::ReadProperty, lastData->coreIndex, args); - return QScriptValue(scriptEngine, rv); + return Value(scriptEngine, rv); } else if (lastData->propType == QMetaType::Double) { double rv = 0; void *args[] = { &rv, 0 }; QMetaObject::metacall(obj, QMetaObject::ReadProperty, lastData->coreIndex, args); - return QScriptValue(scriptEngine, rv); + return Value(scriptEngine, rv); } else { QVariant var = obj->metaObject()->property(lastData->coreIndex).read(obj); return enginePriv->scriptValueFromVariant(var); diff --git a/src/declarative/qml/qmlobjectscriptclass_p.h b/src/declarative/qml/qmlobjectscriptclass_p.h index ca50688..5c488db 100644 --- a/src/declarative/qml/qmlobjectscriptclass_p.h +++ b/src/declarative/qml/qmlobjectscriptclass_p.h @@ -86,7 +86,7 @@ public: QScriptClass::QueryFlags flags, QmlContext *evalContext, QueryHints hints = 0); - QScriptValue property(QObject *, const Identifier &); + Value property(QObject *, const Identifier &); void setProperty(QObject *, const Identifier &name, const QScriptValue &, QmlContext *evalContext = 0); @@ -94,7 +94,7 @@ protected: virtual QScriptClass::QueryFlags queryProperty(Object *, const Identifier &, QScriptClass::QueryFlags flags); - virtual QScriptValue property(Object *, const Identifier &); + virtual Value property(Object *, const Identifier &); virtual void setProperty(Object *, const Identifier &name, const QScriptValue &); virtual bool isQObject() const; virtual QObject *toQObject(Object *, bool *ok = 0); diff --git a/src/declarative/qml/qmltypenamescriptclass.cpp b/src/declarative/qml/qmltypenamescriptclass.cpp index 72106ae..c4c5f53 100644 --- a/src/declarative/qml/qmltypenamescriptclass.cpp +++ b/src/declarative/qml/qmltypenamescriptclass.cpp @@ -139,7 +139,7 @@ QmlTypeNameScriptClass::queryProperty(Object *obj, const Identifier &name, return 0; } -QScriptValue QmlTypeNameScriptClass::property(Object *obj, const Identifier &name) +QmlTypeNameScriptClass::Value QmlTypeNameScriptClass::property(Object *obj, const Identifier &name) { QmlEnginePrivate *ep = QmlEnginePrivate::get(engine); if (type) { diff --git a/src/declarative/qml/qmltypenamescriptclass_p.h b/src/declarative/qml/qmltypenamescriptclass_p.h index e72c05c..702930f 100644 --- a/src/declarative/qml/qmltypenamescriptclass_p.h +++ b/src/declarative/qml/qmltypenamescriptclass_p.h @@ -77,7 +77,7 @@ protected: virtual QScriptClass::QueryFlags queryProperty(Object *, const Identifier &, QScriptClass::QueryFlags flags); - virtual QScriptValue property(Object *, const Identifier &); + virtual Value property(Object *, const Identifier &); virtual void setProperty(Object *, const Identifier &name, const QScriptValue &); private: diff --git a/src/declarative/qml/qmlvaluetypescriptclass.cpp b/src/declarative/qml/qmlvaluetypescriptclass.cpp index 78580e3..65a63f4 100644 --- a/src/declarative/qml/qmlvaluetypescriptclass.cpp +++ b/src/declarative/qml/qmlvaluetypescriptclass.cpp @@ -67,7 +67,8 @@ QScriptValue QmlValueTypeScriptClass::newObject(QObject *object, int coreIndex, ref->type = type; ref->object = object; ref->property = coreIndex; - return QScriptDeclarativeClass::newObject(QmlEnginePrivate::getScriptEngine(engine), this, ref); + QScriptEngine *scriptEngine = QmlEnginePrivate::getScriptEngine(engine); + return QScriptDeclarativeClass::newObject(scriptEngine, this, ref); } QScriptClass::QueryFlags @@ -97,7 +98,7 @@ QmlValueTypeScriptClass::queryProperty(Object *obj, const Identifier &name, return rv; } -QScriptValue QmlValueTypeScriptClass::property(Object *obj, const Identifier &) +QmlValueTypeScriptClass::Value QmlValueTypeScriptClass::property(Object *obj, const Identifier &) { QmlValueTypeReference *ref = static_cast<QmlValueTypeReference *>(obj); diff --git a/src/declarative/qml/qmlvaluetypescriptclass_p.h b/src/declarative/qml/qmlvaluetypescriptclass_p.h index 98d0251..9214987 100644 --- a/src/declarative/qml/qmlvaluetypescriptclass_p.h +++ b/src/declarative/qml/qmlvaluetypescriptclass_p.h @@ -70,7 +70,7 @@ public: virtual QScriptClass::QueryFlags queryProperty(Object *, const Identifier &, QScriptClass::QueryFlags flags); - virtual QScriptValue property(Object *, const Identifier &); + virtual Value property(Object *, const Identifier &); virtual void setProperty(Object *, const Identifier &name, const QScriptValue &); virtual QVariant toVariant(Object *, bool *ok = 0); diff --git a/src/declarative/util/qmlstate_p.h b/src/declarative/util/qmlstate_p.h index 95a6fc5..fdac847 100644 --- a/src/declarative/util/qmlstate_p.h +++ b/src/declarative/util/qmlstate_p.h @@ -133,7 +133,7 @@ class Q_DECLARATIVE_EXPORT QmlState : public QObject Q_PROPERTY(QString extend READ extends WRITE setExtends) Q_PROPERTY(QmlList<QmlStateOperation *>* changes READ changes) Q_CLASSINFO("DefaultProperty", "changes") - Q_CLASSINFO("DeferredPropertyNames", "changes"); + Q_CLASSINFO("DeferredPropertyNames", "changes") public: QmlState(QObject *parent=0); diff --git a/src/declarative/util/qmltransition_p.h b/src/declarative/util/qmltransition_p.h index 0a9b036..c1a6f66 100644 --- a/src/declarative/util/qmltransition_p.h +++ b/src/declarative/util/qmltransition_p.h @@ -67,7 +67,7 @@ class Q_DECLARATIVE_EXPORT QmlTransition : public QObject Q_PROPERTY(bool reversible READ reversible WRITE setReversible) Q_PROPERTY(QmlList<QmlAbstractAnimation *>* animations READ animations) Q_CLASSINFO("DefaultProperty", "animations") - Q_CLASSINFO("DeferredPropertyNames", "animations"); + Q_CLASSINFO("DeferredPropertyNames", "animations") public: QmlTransition(QObject *parent=0); |