diff options
author | Kai Koehne <[email protected]> | 2010-02-26 14:43:39 +0100 |
---|---|---|
committer | Kai Koehne <[email protected]> | 2010-02-26 14:43:39 +0100 |
commit | 318fee6f5c36f9d3dc0ddb7af1dbaf6d18f09dfe (patch) | |
tree | 077383b74ffd6c4b6b48fc66242125fbc6092724 /src/libs/qmljs/qmljsinterpreter.cpp | |
parent | 4ee19843d700bf2ee98fc73d9a8b1e89fc9acc4a (diff) |
QmlJS: Fix compilation with latest changes of QDeclarative
All files have been renamed from Qml to QDeclarative
Diffstat (limited to 'src/libs/qmljs/qmljsinterpreter.cpp')
-rw-r--r-- | src/libs/qmljs/qmljsinterpreter.cpp | 33 |
1 files changed, 16 insertions, 17 deletions
diff --git a/src/libs/qmljs/qmljsinterpreter.cpp b/src/libs/qmljs/qmljsinterpreter.cpp index 9975afdacb6..c685af07208 100644 --- a/src/libs/qmljs/qmljsinterpreter.cpp +++ b/src/libs/qmljs/qmljsinterpreter.cpp @@ -36,12 +36,11 @@ #include <QtCore/QDebug> #ifndef NO_DECLARATIVE_BACKEND -# include <QtDeclarative/QmlType> -# include <QtDeclarative/QmlMetaType> -# include <QtDeclarative/private/qmlgraphicsanchors_p.h> // ### remove me -# include <QtDeclarative/private/qmlgraphicsrectangle_p.h> // ### remove me -# include <QtDeclarative/private/qmlvaluetype_p.h> // ### remove me -# include <QtDeclarative/private/qmlanimation_p.h> // ### remove me +# include <QtDeclarative/private/qdeclarativemetatype_p.h> +# include <QtDeclarative/private/qdeclarativeanchors_p.h> // ### remove me +# include <QtDeclarative/private/qdeclarativerectangle_p.h> // ### remove me +# include <QtDeclarative/private/qdeclarativevaluetype_p.h> // ### remove me +# include <QtDeclarative/private/qdeclarativeanimation_p.h> // ### remove me #endif using namespace QmlJS::Interpreter; @@ -232,8 +231,8 @@ void QmlObjectValue::processMembers(MemberProcessor *processor) const const Value *QmlObjectValue::propertyValue(const QMetaProperty &prop) const { - if (QmlMetaType::isQObject(prop.userType())) { - QmlType *qmlPropertyType = QmlMetaType::qmlType(prop.userType()); + if (QDeclarativeMetaType::isQObject(prop.userType())) { + QDeclarativeType *qmlPropertyType = QDeclarativeMetaType::qmlType(prop.userType()); if (qmlPropertyType && !qmlPropertyType->qmlTypeName().isEmpty()) { QString typeName = qmlPropertyType->qmlTypeName(); @@ -254,7 +253,7 @@ const Value *QmlObjectValue::propertyValue(const QMetaProperty &prop) const typeName.replace(QLatin1Char('.'), QLatin1Char('/')); - if (const ObjectValue *objectValue = engine()->newQmlObject(typeName, "", -1, -1)) // ### we should extend this to lookup the property types in the QmlType object, instead of the QMetaProperty. + if (const ObjectValue *objectValue = engine()->newQmlObject(typeName, "", -1, -1)) // ### we should extend this to lookup the property types in the QDeclarativeType object, instead of the QMetaProperty. return objectValue; } } @@ -335,11 +334,11 @@ const Value *QmlObjectValue::propertyValue(const QMetaProperty &prop) const } // end of switch const QString typeName = prop.typeName(); - if (typeName == QLatin1String("QmlGraphicsAnchorLine")) { + if (typeName == QLatin1String("QDeclarativeAnchorLine")) { value = engine()->anchorLineValue(); } if (value->asStringValue() && prop.name() == QLatin1String("easing") - && isDerivedFrom(&QmlPropertyAnimation::staticMetaObject)) { + && isDerivedFrom(&QDeclarativePropertyAnimation::staticMetaObject)) { value = engine()->easingCurveNameValue(); } @@ -2156,13 +2155,13 @@ const Value *Engine::defaultValueForBuiltinType(const QString &typeName) const #ifndef NO_DECLARATIVE_BACKEND QmlObjectValue *Engine::newQmlObject(const QString &name, const QString &prefix, int majorVersion, int minorVersion) { - if (name == QLatin1String("QmlGraphicsAnchors")) { - QmlObjectValue *object = new QmlObjectValue(&QmlGraphicsAnchors::staticMetaObject, QLatin1String("Anchors"), -1, -1, this); + if (name == QLatin1String("QDeclarativeAnchors")) { + QmlObjectValue *object = new QmlObjectValue(&QDeclarativeAnchors::staticMetaObject, QLatin1String("Anchors"), -1, -1, this); return object; - } else if (name == QLatin1String("QmlGraphicsPen")) { - QmlObjectValue *object = new QmlObjectValue(&QmlGraphicsPen::staticMetaObject, QLatin1String("Pen"), -1, -1, this); + } else if (name == QLatin1String("QDeclarativePen")) { + QmlObjectValue *object = new QmlObjectValue(&QDeclarativePen::staticMetaObject, QLatin1String("Pen"), -1, -1, this); return object; - } else if (name == QLatin1String("QmlGraphicsScaleGrid")) { + } else if (name == QLatin1String("QDeclarativeScaleGrid")) { QmlObjectValue *object = new QmlObjectValue(&QObject::staticMetaObject, QLatin1String("ScaleGrid"), -1, -1, this); object->setProperty("left", numberValue()); object->setProperty("top", numberValue()); @@ -2174,7 +2173,7 @@ QmlObjectValue *Engine::newQmlObject(const QString &name, const QString &prefix, // ### TODO: add support for QML packages const QString componentName = prefix + QLatin1Char('/') + name; - if (QmlType *qmlType = QmlMetaType::qmlType(componentName.toUtf8(), majorVersion, minorVersion)) { + if (QDeclarativeType *qmlType = QDeclarativeMetaType::qmlType(componentName.toUtf8(), majorVersion, minorVersion)) { const QString typeName = qmlType->qmlTypeName(); const QString strippedTypeName = typeName.mid(typeName.lastIndexOf('/') + 1); QmlObjectValue *object = new QmlObjectValue(qmlType->metaObject(), strippedTypeName, majorVersion, minorVersion, this); |