summaryrefslogtreecommitdiffstats
path: root/src/declarative/qml
diff options
context:
space:
mode:
authorWarwick Allison <warwick.allison@nokia.com>2010-02-02 23:41:16 (GMT)
committerWarwick Allison <warwick.allison@nokia.com>2010-02-02 23:41:16 (GMT)
commit241a82b99e149d286980e3a8e5bd6ad996d8eb65 (patch)
treeb5af14c6678373eecf9822292d43ee70c1ce8e8e /src/declarative/qml
parent2ae0680231383800a90d9f4ce7003d64a709659e (diff)
downloadQt-241a82b99e149d286980e3a8e5bd6ad996d8eb65.zip
Qt-241a82b99e149d286980e3a8e5bd6ad996d8eb65.tar.gz
Qt-241a82b99e149d286980e3a8e5bd6ad996d8eb65.tar.bz2
The depot (4.6.2) does not have the Value patch yet, adjust version checks
accordingly.
Diffstat (limited to 'src/declarative/qml')
-rw-r--r--src/declarative/qml/qmlobjectscriptclass.cpp6
-rw-r--r--src/declarative/qml/qmlobjectscriptclass_p.h4
-rw-r--r--src/declarative/qml/qmlscriptclass_p.h2
3 files changed, 6 insertions, 6 deletions
diff --git a/src/declarative/qml/qmlobjectscriptclass.cpp b/src/declarative/qml/qmlobjectscriptclass.cpp
index 5fd76c6..d3c3ca5 100644
--- a/src/declarative/qml/qmlobjectscriptclass.cpp
+++ b/src/declarative/qml/qmlobjectscriptclass.cpp
@@ -70,7 +70,7 @@ struct ObjectData : public QScriptDeclarativeClass::Object {
*/
QmlObjectScriptClass::QmlObjectScriptClass(QmlEngine *bindEngine)
: QmlScriptClass(QmlEnginePrivate::getScriptEngine(bindEngine)),
-#if (QT_VERSION >= QT_VERSION_CHECK(4, 6, 2))
+#if (QT_VERSION > QT_VERSION_CHECK(4, 6, 2))
methods(bindEngine),
#endif
lastData(0), engine(bindEngine)
@@ -231,7 +231,7 @@ 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))
+#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)));
@@ -444,7 +444,7 @@ QStringList QmlObjectScriptClass::propertyNames(Object *object)
return cache->propertyNames();
}
-#if (QT_VERSION >= QT_VERSION_CHECK(4, 6, 2))
+#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) {}
diff --git a/src/declarative/qml/qmlobjectscriptclass_p.h b/src/declarative/qml/qmlobjectscriptclass_p.h
index ebb2c2a..adb26b0 100644
--- a/src/declarative/qml/qmlobjectscriptclass_p.h
+++ b/src/declarative/qml/qmlobjectscriptclass_p.h
@@ -65,7 +65,7 @@ class QScriptContext;
class QScriptEngine;
class QmlContext;
-#if (QT_VERSION >= QT_VERSION_CHECK(4, 6, 2))
+#if (QT_VERSION > QT_VERSION_CHECK(4, 6, 2))
class Q_AUTOTEST_EXPORT QmlObjectMethodScriptClass : public QScriptDeclarativeClass
{
public:
@@ -118,7 +118,7 @@ protected:
virtual QObject *toQObject(Object *, bool *ok = 0);
private:
-#if (QT_VERSION >= QT_VERSION_CHECK(4, 6, 2))
+#if (QT_VERSION > QT_VERSION_CHECK(4, 6, 2))
QmlObjectMethodScriptClass methods;
#endif
diff --git a/src/declarative/qml/qmlscriptclass_p.h b/src/declarative/qml/qmlscriptclass_p.h
index 7ffb2ae..8064bdc 100644
--- a/src/declarative/qml/qmlscriptclass_p.h
+++ b/src/declarative/qml/qmlscriptclass_p.h
@@ -66,7 +66,7 @@ public:
static QVariant toVariant(QmlEngine *, const QScriptValue &);
-#if (QT_VERSION < QT_VERSION_CHECK(4, 6, 2))
+#if (QT_VERSION <= QT_VERSION_CHECK(4, 6, 2))
struct Value : public QScriptValue {
Value() : QScriptValue() {}
Value(QScriptEngine *engine, int v) : QScriptValue(engine, v) {}