diff options
Diffstat (limited to 'src/declarative/qml/qmlobjectscriptclass_p.h')
-rw-r--r-- | src/declarative/qml/qmlobjectscriptclass_p.h | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/src/declarative/qml/qmlobjectscriptclass_p.h b/src/declarative/qml/qmlobjectscriptclass_p.h index 025e491..36ba44f 100644 --- a/src/declarative/qml/qmlobjectscriptclass_p.h +++ b/src/declarative/qml/qmlobjectscriptclass_p.h @@ -56,9 +56,7 @@ #include "qmlpropertycache_p.h" #include "qmltypenamecache_p.h" -#include <QtScript/qscriptclass.h> - -#include <private/qscriptdeclarativeclass_p.h> +#include <private/qmlscriptclass_p.h> QT_BEGIN_NAMESPACE @@ -67,6 +65,7 @@ class QScriptContext; class QScriptEngine; class QmlContext; +#if (QT_VERSION >= QT_VERSION_CHECK(4, 6, 2)) class Q_AUTOTEST_EXPORT QmlObjectMethodScriptClass : public QScriptDeclarativeClass { public: @@ -80,8 +79,9 @@ protected: private: QmlEngine *engine; }; +#endif -class Q_AUTOTEST_EXPORT QmlObjectScriptClass : public QScriptDeclarativeClass +class Q_AUTOTEST_EXPORT QmlObjectScriptClass : public QmlScriptClass { public: QmlObjectScriptClass(QmlEngine *); @@ -101,7 +101,9 @@ public: QScriptClass::QueryFlags flags, QmlContext *evalContext, QueryHints hints = 0); - Value property(QObject *, const Identifier &); + + ScriptValue property(QObject *, const Identifier &); + void setProperty(QObject *, const Identifier &name, const QScriptValue &, QmlContext *evalContext = 0); virtual QStringList propertyNames(Object *); @@ -110,13 +112,15 @@ protected: virtual QScriptClass::QueryFlags queryProperty(Object *, const Identifier &, QScriptClass::QueryFlags flags); - virtual Value property(Object *, const Identifier &); + virtual ScriptValue property(Object *, const Identifier &); virtual void setProperty(Object *, const Identifier &name, const QScriptValue &); virtual bool isQObject() const; virtual QObject *toQObject(Object *, bool *ok = 0); private: +#if (QT_VERSION >= QT_VERSION_CHECK(4, 6, 2)) QmlObjectMethodScriptClass methods; +#endif QmlTypeNameCache::Data *lastTNData; QmlPropertyCache::Data *lastData; |