summaryrefslogtreecommitdiffstats
path: root/src/declarative/qml
diff options
context:
space:
mode:
authorAaron Kennedy <aaron.kennedy@nokia.com>2010-01-20 04:08:18 (GMT)
committerAaron Kennedy <aaron.kennedy@nokia.com>2010-01-20 04:08:18 (GMT)
commitc895bdc921630f769c616a145167bac9a300f72d (patch)
tree160ec625536838dda944372e83f286e8c22910bd /src/declarative/qml
parenteebbdab90153126fa3c72c527084980f9a4c580f (diff)
parentb2c73bd42242f3da15560ed49f20697a1280f86f (diff)
downloadQt-c895bdc921630f769c616a145167bac9a300f72d.zip
Qt-c895bdc921630f769c616a145167bac9a300f72d.tar.gz
Qt-c895bdc921630f769c616a145167bac9a300f72d.tar.bz2
Merge branch 'kinetic-declarativeui' of scm.dev.nokia.troll.no:qt/kinetic into kinetic-declarativeui
Diffstat (limited to 'src/declarative/qml')
-rw-r--r--src/declarative/qml/qml.pri4
-rw-r--r--src/declarative/qml/qmlbindingvme.cpp6
-rw-r--r--src/declarative/qml/qmlcontextscriptclass.cpp4
-rw-r--r--src/declarative/qml/qmlcontextscriptclass_p.h9
-rw-r--r--src/declarative/qml/qmlengine.cpp6
-rw-r--r--src/declarative/qml/qmlengine_p.h10
-rw-r--r--src/declarative/qml/qmlexpression.cpp21
-rw-r--r--src/declarative/qml/qmllistscriptclass.cpp4
-rw-r--r--src/declarative/qml/qmllistscriptclass_p.h6
-rw-r--r--src/declarative/qml/qmlobjectscriptclass.cpp18
-rw-r--r--src/declarative/qml/qmlobjectscriptclass_p.h16
-rw-r--r--src/declarative/qml/qmlscriptclass_p.h89
-rw-r--r--src/declarative/qml/qmltypenamescriptclass.cpp5
-rw-r--r--src/declarative/qml/qmltypenamescriptclass_p.h6
-rw-r--r--src/declarative/qml/qmlvaluetypescriptclass.cpp4
-rw-r--r--src/declarative/qml/qmlvaluetypescriptclass_p.h8
-rw-r--r--src/declarative/qml/qmlworkerscript_p.h2
17 files changed, 170 insertions, 48 deletions
diff --git a/src/declarative/qml/qml.pri b/src/declarative/qml/qml.pri
index 1b35442..b3a3905 100644
--- a/src/declarative/qml/qml.pri
+++ b/src/declarative/qml/qml.pri
@@ -119,7 +119,9 @@ HEADERS += \
$$PWD/qmlvaluetypescriptclass_p.h \
$$PWD/qmltypenamescriptclass_p.h \
$$PWD/qmllistscriptclass_p.h \
- $$PWD/qmlworkerscript_p.h
+ $$PWD/qmlworkerscript_p.h \
+ $$PWD/qmlscriptclass_p.h \
+ $$PWD/qmlguard_p.h
QT += sql
diff --git a/src/declarative/qml/qmlbindingvme.cpp b/src/declarative/qml/qmlbindingvme.cpp
index 5b602b9..da57452 100644
--- a/src/declarative/qml/qmlbindingvme.cpp
+++ b/src/declarative/qml/qmlbindingvme.cpp
@@ -383,8 +383,14 @@ inline void subscribe(QObject *o, int notifyIndex,
QmlBindingVME::Config::Subscription *s = config->subscriptions + subIndex;
if (o != s->source || notifyIndex != s->notifyIndex) {
if (s->source)
+#if (QT_VERSION >= QT_VERSION_CHECK(4, 6, 2))
QMetaObject::disconnectOne(s->source, s->notifyIndex,
config->target, config->targetSlot + subIndex);
+#else
+ // QTBUG-6781
+ QMetaObject::disconnect(s->source, s->notifyIndex,
+ config->target, config->targetSlot + subIndex);
+#endif
s->source = o;
s->notifyIndex = notifyIndex;
if (s->source && s->notifyIndex != -1)
diff --git a/src/declarative/qml/qmlcontextscriptclass.cpp b/src/declarative/qml/qmlcontextscriptclass.cpp
index 71b77d5..eecc611 100644
--- a/src/declarative/qml/qmlcontextscriptclass.cpp
+++ b/src/declarative/qml/qmlcontextscriptclass.cpp
@@ -77,7 +77,7 @@ struct ContextData : public QScriptDeclarativeClass::Object {
via QtScript.
*/
QmlContextScriptClass::QmlContextScriptClass(QmlEngine *bindEngine)
-: QScriptDeclarativeClass(QmlEnginePrivate::getScriptEngine(bindEngine)), engine(bindEngine),
+: QmlScriptClass(QmlEnginePrivate::getScriptEngine(bindEngine)), engine(bindEngine),
lastScopeObject(0), lastContext(0), lastData(0), lastPropertyIndex(-1), lastDefaultObject(-1)
{
}
@@ -196,7 +196,7 @@ QmlContextScriptClass::queryProperty(QmlContext *bindContext, QObject *scopeObje
return 0;
}
-QmlContextScriptClass::Value
+QmlContextScriptClass::ScriptValue
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 f652371..f98d44f 100644
--- a/src/declarative/qml/qmlcontextscriptclass_p.h
+++ b/src/declarative/qml/qmlcontextscriptclass_p.h
@@ -54,16 +54,13 @@
//
#include "qmltypenamecache_p.h"
-
-#include <QtScript/qscriptclass.h>
-
-#include <private/qscriptdeclarativeclass_p.h>
+#include "qmlscriptclass_p.h"
QT_BEGIN_NAMESPACE
class QmlEngine;
class QmlContext;
-class QmlContextScriptClass : public QScriptDeclarativeClass
+class QmlContextScriptClass : public QmlScriptClass
{
public:
QmlContextScriptClass(QmlEngine *);
@@ -77,7 +74,7 @@ public:
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 &);
private:
diff --git a/src/declarative/qml/qmlengine.cpp b/src/declarative/qml/qmlengine.cpp
index b5e7c2d..122eb07 100644
--- a/src/declarative/qml/qmlengine.cpp
+++ b/src/declarative/qml/qmlengine.cpp
@@ -64,6 +64,7 @@
#include "qmlglobal_p.h"
#include "qmlworkerscript_p.h"
#include "qmlcomponent_p.h"
+#include "qmlscriptclass_p.h"
#include <qfxperf_p_p.h>
@@ -1056,9 +1057,8 @@ QVariant QmlEnginePrivate::scriptValueToVariant(const QScriptValue &val)
}
}
-QmlScriptClass::QmlScriptClass(QmlEngine *bindengine)
-: QScriptClass(QmlEnginePrivate::getScriptEngine(bindengine)),
- engine(bindengine)
+QmlScriptClass::QmlScriptClass(QScriptEngine *engine)
+: QScriptDeclarativeClass(engine)
{
}
diff --git a/src/declarative/qml/qmlengine_p.h b/src/declarative/qml/qmlengine_p.h
index 490a4ce..13c1afb 100644
--- a/src/declarative/qml/qmlengine_p.h
+++ b/src/declarative/qml/qmlengine_p.h
@@ -308,16 +308,6 @@ public:
};
-class QmlScriptClass : public QScriptClass
-{
-public:
- QmlScriptClass(QmlEngine *);
-
- static QVariant toVariant(QmlEngine *, const QScriptValue &);
-protected:
- QmlEngine *engine;
-};
-
QT_END_NAMESPACE
#endif // QMLENGINE_P_H
diff --git a/src/declarative/qml/qmlexpression.cpp b/src/declarative/qml/qmlexpression.cpp
index cd6f582..c00e552 100644
--- a/src/declarative/qml/qmlexpression.cpp
+++ b/src/declarative/qml/qmlexpression.cpp
@@ -641,9 +641,16 @@ void QmlExpressionPrivate::clearGuards()
for (int ii = 0; ii < data->guardListLength; ++ii) {
if (data->guardList[ii].data()) {
+#if (QT_VERSION >= QT_VERSION_CHECK(4, 6, 2))
QMetaObject::disconnectOne(data->guardList[ii].data(),
data->guardList[ii].notifyIndex,
q, notifyIdx);
+#else
+ // QTBUG-6781
+ QMetaObject::disconnect(data->guardList[ii].data(),
+ data->guardList[ii].notifyIndex,
+ q, notifyIdx);
+#endif
}
}
@@ -684,9 +691,16 @@ void QmlExpressionPrivate::updateGuards(const QPODVector<QmlEnginePrivate::Captu
}
} else if(data->guardList[ii].data() && !data->guardList[ii].isDuplicate) {
// Cache miss
+#if (QT_VERSION >= QT_VERSION_CHECK(4, 6, 2))
QMetaObject::disconnectOne(data->guardList[ii].data(),
data->guardList[ii].notifyIndex,
q, notifyIdx);
+#else
+ // QTBUG-6781
+ QMetaObject::disconnect(data->guardList[ii].data(),
+ data->guardList[ii].notifyIndex,
+ q, notifyIdx);
+#endif
}
/* else {
// Cache miss, but nothing to do
@@ -732,9 +746,16 @@ void QmlExpressionPrivate::updateGuards(const QPODVector<QmlEnginePrivate::Captu
for (int ii = properties.count(); ii < data->guardListLength; ++ii) {
if (data->guardList[ii].data() && !data->guardList[ii].isDuplicate) {
+#if (QT_VERSION >= QT_VERSION_CHECK(4, 6, 2))
QMetaObject::disconnectOne(data->guardList[ii].data(),
data->guardList[ii].notifyIndex,
q, notifyIdx);
+#else
+ // QTBUG-6781
+ QMetaObject::disconnect(data->guardList[ii].data(),
+ data->guardList[ii].notifyIndex,
+ q, notifyIdx);
+#endif
}
}
diff --git a/src/declarative/qml/qmllistscriptclass.cpp b/src/declarative/qml/qmllistscriptclass.cpp
index 4b8b056..441c410 100644
--- a/src/declarative/qml/qmllistscriptclass.cpp
+++ b/src/declarative/qml/qmllistscriptclass.cpp
@@ -53,7 +53,7 @@ struct ListData : public QScriptDeclarativeClass::Object {
};
QmlListScriptClass::QmlListScriptClass(QmlEngine *e)
-: QScriptDeclarativeClass(QmlEnginePrivate::getScriptEngine(e)), engine(e)
+: QmlScriptClass(QmlEnginePrivate::getScriptEngine(e)), engine(e)
{
QScriptEngine *scriptEngine = QmlEnginePrivate::getScriptEngine(engine);
Q_UNUSED(scriptEngine);
@@ -100,7 +100,7 @@ QmlListScriptClass::queryProperty(Object *object, const Identifier &name,
}
}
-QmlListScriptClass::Value QmlListScriptClass::property(Object *obj, const Identifier &name)
+QmlListScriptClass::ScriptValue QmlListScriptClass::property(Object *obj, const Identifier &name)
{
QScriptEngine *scriptEngine = QmlEnginePrivate::getScriptEngine(engine);
QmlEnginePrivate *enginePriv = QmlEnginePrivate::get(engine);
diff --git a/src/declarative/qml/qmllistscriptclass_p.h b/src/declarative/qml/qmllistscriptclass_p.h
index 43ca929..0c6c5b2 100644
--- a/src/declarative/qml/qmllistscriptclass_p.h
+++ b/src/declarative/qml/qmllistscriptclass_p.h
@@ -53,12 +53,12 @@
// We mean it.
//
-#include <private/qscriptdeclarativeclass_p.h>
+#include <private/qmlscriptclass_p.h>
QT_BEGIN_NAMESPACE
class QmlEngine;
-class QmlListScriptClass : public QScriptDeclarativeClass
+class QmlListScriptClass : public QmlScriptClass
{
public:
QmlListScriptClass(QmlEngine *);
@@ -70,7 +70,7 @@ public:
protected:
virtual QScriptClass::QueryFlags queryProperty(Object *, const Identifier &,
QScriptClass::QueryFlags flags);
- virtual Value property(Object *, const Identifier &);
+ virtual ScriptValue property(Object *, const Identifier &);
private:
PersistentIdentifier m_lengthId;
diff --git a/src/declarative/qml/qmlobjectscriptclass.cpp b/src/declarative/qml/qmlobjectscriptclass.cpp
index 485d240..86f0afc 100644
--- a/src/declarative/qml/qmlobjectscriptclass.cpp
+++ b/src/declarative/qml/qmlobjectscriptclass.cpp
@@ -69,7 +69,10 @@ struct ObjectData : public QScriptDeclarativeClass::Object {
QtScript for QML.
*/
QmlObjectScriptClass::QmlObjectScriptClass(QmlEngine *bindEngine)
-: QScriptDeclarativeClass(QmlEnginePrivate::getScriptEngine(bindEngine)), methods(bindEngine),
+: QmlScriptClass(QmlEnginePrivate::getScriptEngine(bindEngine)),
+#if (QT_VERSION >= QT_VERSION_CHECK(4, 6, 2))
+ methods(bindEngine),
+#endif
lastData(0), engine(bindEngine)
{
QScriptEngine *scriptEngine = QmlEnginePrivate::getScriptEngine(engine);
@@ -192,13 +195,13 @@ QmlObjectScriptClass::queryProperty(QObject *obj, const Identifier &name,
return 0;
}
-QmlObjectScriptClass::Value
+QmlObjectScriptClass::ScriptValue
QmlObjectScriptClass::property(Object *object, const Identifier &name)
{
return property(toQObject(object), name);
}
-QmlObjectScriptClass::Value
+QmlObjectScriptClass::ScriptValue
QmlObjectScriptClass::property(QObject *obj, const Identifier &name)
{
QScriptEngine *scriptEngine = QmlEnginePrivate::getScriptEngine(engine);
@@ -226,10 +229,15 @@ QmlObjectScriptClass::property(QObject *obj, const Identifier &name)
if (lastData->flags & QmlPropertyCache::Data::IsVMEFunction) {
return Value(scriptEngine, ((QmlVMEMetaObject *)(obj->metaObject()))->vmeMethod(lastData->coreIndex));
} else {
+#if (QT_VERSION >= QT_VERSION_CHECK(4, 6, 2))
// Uncomment to use QtScript method call logic
// QScriptValue sobj = scriptEngine->newQObject(obj);
// return Value(scriptEngine, sobj.property(toString(name)));
return Value(scriptEngine, methods.newMethod(obj, lastData));
+#else
+ QScriptValue sobj = scriptEngine->newQObject(obj);
+ return Value(scriptEngine, sobj.property(toString(name)));
+#endif
}
} else {
if (enginePriv->captureProperties && !(lastData->flags & QmlPropertyCache::Data::IsConstant)) {
@@ -428,6 +436,8 @@ QStringList QmlObjectScriptClass::propertyNames(Object *object)
return cache->propertyNames();
}
+#if (QT_VERSION >= QT_VERSION_CHECK(4, 6, 2))
+
struct MethodData : public QScriptDeclarativeClass::Object {
MethodData(QObject *o, const QmlPropertyCache::Data &d) : object(o), data(d) {}
@@ -665,5 +675,7 @@ QmlObjectMethodScriptClass::Value QmlObjectMethodScriptClass::call(Object *o, QS
return Value();
}
+#endif
+
QT_END_NAMESPACE
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;
diff --git a/src/declarative/qml/qmlscriptclass_p.h b/src/declarative/qml/qmlscriptclass_p.h
new file mode 100644
index 0000000..4fee59d
--- /dev/null
+++ b/src/declarative/qml/qmlscriptclass_p.h
@@ -0,0 +1,89 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtDeclarative module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QMLSCRIPTCLASS_P_H
+#define QMLSCRIPTCLASS_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include <QtScript/qscriptclass.h>
+#include <private/qscriptdeclarativeclass_p.h>
+
+QT_BEGIN_NAMESPACE
+
+class QmlEngine;
+class QmlScriptClass : public QScriptDeclarativeClass
+{
+public:
+ QmlScriptClass(QScriptEngine *);
+
+ static QVariant toVariant(QmlEngine *, const QScriptValue &);
+
+#if (QT_VERSION < QT_VERSION_CHECK(4, 6, 2))
+ struct Value : public QScriptValue {
+ Value() : QScriptValue() {}
+ Value(QScriptEngine *engine, int v) : QScriptValue(engine, v) {}
+ Value(QScriptEngine *engine, uint v) : QScriptValue(engine, v) {}
+ Value(QScriptEngine *engine, bool v) : QScriptValue(engine, v) {}
+ Value(QScriptEngine *engine, double v) : QScriptValue(engine, v) {}
+ Value(QScriptEngine *engine, float v) : QScriptValue(engine, v) {}
+ Value(QScriptEngine *engine, const QString &v) : QScriptValue(engine, v) {}
+ Value(QScriptEngine *, const QScriptValue &v) : QScriptValue(v) {}
+ };
+
+ typedef QScriptValue ScriptValue;
+#else
+ typedef Value QScriptValue;
+#endif
+};
+
+QT_END_NAMESPACE
+
+#endif // QMLSCRIPTCLASS_P_H
diff --git a/src/declarative/qml/qmltypenamescriptclass.cpp b/src/declarative/qml/qmltypenamescriptclass.cpp
index 3c57223..14c8652 100644
--- a/src/declarative/qml/qmltypenamescriptclass.cpp
+++ b/src/declarative/qml/qmltypenamescriptclass.cpp
@@ -62,7 +62,7 @@ struct TypeNameData : public QScriptDeclarativeClass::Object {
};
QmlTypeNameScriptClass::QmlTypeNameScriptClass(QmlEngine *bindEngine)
-: QScriptDeclarativeClass(QmlEnginePrivate::getScriptEngine(bindEngine)),
+: QmlScriptClass(QmlEnginePrivate::getScriptEngine(bindEngine)),
engine(bindEngine), object(0), type(0)
{
}
@@ -139,7 +139,8 @@ QmlTypeNameScriptClass::queryProperty(Object *obj, const Identifier &name,
return 0;
}
-QmlTypeNameScriptClass::Value QmlTypeNameScriptClass::property(Object *obj, const Identifier &name)
+QmlTypeNameScriptClass::ScriptValue
+QmlTypeNameScriptClass::property(Object *obj, const Identifier &name)
{
QmlEnginePrivate *ep = QmlEnginePrivate::get(engine);
QScriptEngine *scriptEngine = QmlEnginePrivate::getScriptEngine(engine);
diff --git a/src/declarative/qml/qmltypenamescriptclass_p.h b/src/declarative/qml/qmltypenamescriptclass_p.h
index 702930f..cf8c621 100644
--- a/src/declarative/qml/qmltypenamescriptclass_p.h
+++ b/src/declarative/qml/qmltypenamescriptclass_p.h
@@ -56,14 +56,14 @@
#include <QtScript/qscriptclass.h>
-#include <private/qscriptdeclarativeclass_p.h>
+#include <private/qmlscriptclass_p.h>
QT_BEGIN_NAMESPACE
class QmlEngine;
class QmlType;
class QmlTypeNameCache;
-class QmlTypeNameScriptClass : public QScriptDeclarativeClass
+class QmlTypeNameScriptClass : public QmlScriptClass
{
public:
QmlTypeNameScriptClass(QmlEngine *);
@@ -77,7 +77,7 @@ 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 &);
private:
diff --git a/src/declarative/qml/qmlvaluetypescriptclass.cpp b/src/declarative/qml/qmlvaluetypescriptclass.cpp
index 90de6e7..5e222a1 100644
--- a/src/declarative/qml/qmlvaluetypescriptclass.cpp
+++ b/src/declarative/qml/qmlvaluetypescriptclass.cpp
@@ -53,7 +53,7 @@ struct QmlValueTypeReference : public QScriptDeclarativeClass::Object {
};
QmlValueTypeScriptClass::QmlValueTypeScriptClass(QmlEngine *bindEngine)
-: QScriptDeclarativeClass(QmlEnginePrivate::getScriptEngine(bindEngine)), engine(bindEngine)
+: QmlScriptClass(QmlEnginePrivate::getScriptEngine(bindEngine)), engine(bindEngine)
{
}
@@ -98,7 +98,7 @@ QmlValueTypeScriptClass::queryProperty(Object *obj, const Identifier &name,
return rv;
}
-QmlValueTypeScriptClass::Value QmlValueTypeScriptClass::property(Object *obj, const Identifier &)
+QmlValueTypeScriptClass::ScriptValue 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 9214987..09af967 100644
--- a/src/declarative/qml/qmlvaluetypescriptclass_p.h
+++ b/src/declarative/qml/qmlvaluetypescriptclass_p.h
@@ -52,15 +52,15 @@
//
// We mean it.
//
-#include <QtScript/qscriptclass.h>
-#include <private/qscriptdeclarativeclass_p.h>
+
+#include <private/qmlscriptclass_p.h>
QT_BEGIN_NAMESPACE
class QmlEngine;
class QmlValueType;
-class QmlValueTypeScriptClass : public QScriptDeclarativeClass
+class QmlValueTypeScriptClass : public QmlScriptClass
{
public:
QmlValueTypeScriptClass(QmlEngine *);
@@ -70,7 +70,7 @@ public:
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 QVariant toVariant(Object *, bool *ok = 0);
diff --git a/src/declarative/qml/qmlworkerscript_p.h b/src/declarative/qml/qmlworkerscript_p.h
index 1c70f2d..f0ef7c9 100644
--- a/src/declarative/qml/qmlworkerscript_p.h
+++ b/src/declarative/qml/qmlworkerscript_p.h
@@ -118,7 +118,7 @@ class QmlWorkerListModelAgent;
class QmlWorkerListModel : public QListModelInterface
{
Q_OBJECT
- Q_PROPERTY(int count READ count NOTIFY countChanged);
+ Q_PROPERTY(int count READ count NOTIFY countChanged)
public:
QmlWorkerListModel(QObject * = 0);