diff options
Diffstat (limited to 'src/declarative/qml/v4')
-rw-r--r-- | src/declarative/qml/v4/qv4bindings.cpp | 11 | ||||
-rw-r--r-- | src/declarative/qml/v4/qv4compiler.cpp | 7 | ||||
-rw-r--r-- | src/declarative/qml/v4/qv4compiler_p_p.h | 32 | ||||
-rw-r--r-- | src/declarative/qml/v4/qv4ir.cpp | 1 | ||||
-rw-r--r-- | src/declarative/qml/v4/qv4ir_p.h | 1 | ||||
-rw-r--r-- | src/declarative/qml/v4/qv4irbuilder.cpp | 6 |
6 files changed, 5 insertions, 53 deletions
diff --git a/src/declarative/qml/v4/qv4bindings.cpp b/src/declarative/qml/v4/qv4bindings.cpp index a1f4593c2e..eed4efc87b 100644 --- a/src/declarative/qml/v4/qv4bindings.cpp +++ b/src/declarative/qml/v4/qv4bindings.cpp @@ -453,12 +453,7 @@ static bool testCompareVariants(const QVariant &qtscriptRaw, const QVariant &v4) int type = qtscript.userType(); - if (type == qMetaTypeId<QDeclarative1AnchorLine>()) { - QDeclarative1AnchorLine la = qvariant_cast<QDeclarative1AnchorLine>(qtscript); - QDeclarative1AnchorLine ra = qvariant_cast<QDeclarative1AnchorLine>(v4); - - return la == ra; - } else if (type == QDeclarativeMetaType::QQuickAnchorLineMetaTypeId()) { + if (type == QDeclarativeMetaType::QQuickAnchorLineMetaTypeId()) { return QDeclarativeMetaType::QQuickAnchorLineCompare(qtscript.constData(), v4.constData()); } else if (type == QMetaType::Double) { @@ -538,9 +533,7 @@ static void testBindingResult(const QString &binding, int line, int column, v4value = result.getqreal(); break; default: - if (resultType == qMetaTypeId<QDeclarative1AnchorLine>()) { - v4value = qVariantFromValue<QDeclarative1AnchorLine>(*(QDeclarative1AnchorLine *)result.typeDataPtr()); - } else if (resultType == QDeclarativeMetaType::QQuickAnchorLineMetaTypeId()) { + if (resultType == QDeclarativeMetaType::QQuickAnchorLineMetaTypeId()) { v4value = QVariant(QDeclarativeMetaType::QQuickAnchorLineMetaTypeId(), result.typeDataPtr()); } else { iserror = true; diff --git a/src/declarative/qml/v4/qv4compiler.cpp b/src/declarative/qml/v4/qv4compiler.cpp index 0d29872f4c..42e56d12c9 100644 --- a/src/declarative/qml/v4/qv4compiler.cpp +++ b/src/declarative/qml/v4/qv4compiler.cpp @@ -345,9 +345,7 @@ void QV4CompilerPrivate::visitName(IR::Name *e) break; default: - if (propTy == qMetaTypeId<QDeclarative1AnchorLine>()) { - regType = PODValueType; - } else if (propTy == QDeclarativeMetaType::QQuickAnchorLineMetaTypeId()) { + if (propTy == QDeclarativeMetaType::QQuickAnchorLineMetaTypeId()) { regType = PODValueType; } else if (QDeclarativeMetaType::isQObject(propTy)) { regType = QObjectStarType; @@ -990,9 +988,6 @@ void QV4CompilerPrivate::visitRet(IR::Ret *s) case IR::UrlType: test.regType = QMetaType::QUrl; break; - case IR::AnchorLineType: - test.regType = qMetaTypeId<QDeclarative1AnchorLine>(); - break; case IR::SGAnchorLineType: test.regType = QDeclarativeMetaType::QQuickAnchorLineMetaTypeId(); break; diff --git a/src/declarative/qml/v4/qv4compiler_p_p.h b/src/declarative/qml/v4/qv4compiler_p_p.h index b9e4976eb8..85a7c36f87 100644 --- a/src/declarative/qml/v4/qv4compiler_p_p.h +++ b/src/declarative/qml/v4/qv4compiler_p_p.h @@ -63,36 +63,6 @@ QT_BEGIN_HEADER QT_BEGIN_NAMESPACE -// NOTE: This is a copy of QDeclarative1AnchorLine: src/qtquick1/graphicsitems/qdeclarativeanchors_p_p.h -class QGraphicsObject; -class QDeclarative1AnchorLine -{ -public: - QDeclarative1AnchorLine() : item(0), anchorLine(Invalid) {} - - enum AnchorLine { - Invalid = 0x0, - Left = 0x01, - Right = 0x02, - Top = 0x04, - Bottom = 0x08, - HCenter = 0x10, - VCenter = 0x20, - Baseline = 0x40, - Horizontal_Mask = Left | Right | HCenter, - Vertical_Mask = Top | Bottom | VCenter | Baseline - }; - - QGraphicsObject *item; - AnchorLine anchorLine; -}; - -inline bool operator==(const QDeclarative1AnchorLine& a, const QDeclarative1AnchorLine& b) -{ - return a.item == b.item && a.anchorLine == b.anchorLine; -} - - template <typename _Key, typename _Value> class QDeclarativeAssociationList { @@ -269,8 +239,6 @@ private: QT_END_NAMESPACE -Q_DECLARE_METATYPE(QDeclarative1AnchorLine) - QT_END_HEADER #endif // QV4COMPILER_P_P_H diff --git a/src/declarative/qml/v4/qv4ir.cpp b/src/declarative/qml/v4/qv4ir.cpp index 83acd05a0f..149479d757 100644 --- a/src/declarative/qml/v4/qv4ir.cpp +++ b/src/declarative/qml/v4/qv4ir.cpp @@ -59,7 +59,6 @@ inline const char *typeName(Type t) case VoidType: return "void"; case StringType: return "string"; case UrlType: return "url"; - case AnchorLineType: return "AnchorLine"; case SGAnchorLineType: return "SGAnchorLine"; case AttachType: return "AttachType"; case ObjectType: return "object"; diff --git a/src/declarative/qml/v4/qv4ir_p.h b/src/declarative/qml/v4/qv4ir_p.h index e57b29da79..2ed403fc29 100644 --- a/src/declarative/qml/v4/qv4ir_p.h +++ b/src/declarative/qml/v4/qv4ir_p.h @@ -142,7 +142,6 @@ enum Type { VoidType, StringType, UrlType, - AnchorLineType, SGAnchorLineType, AttachType, ObjectType, diff --git a/src/declarative/qml/v4/qv4irbuilder.cpp b/src/declarative/qml/v4/qv4irbuilder.cpp index 35b36ae114..2cc1c6eaab 100644 --- a/src/declarative/qml/v4/qv4irbuilder.cpp +++ b/src/declarative/qml/v4/qv4irbuilder.cpp @@ -70,11 +70,9 @@ static IR::Type irTypeFromVariantType(int t, QDeclarativeEnginePrivate *engine, return IR::UrlType; default: - if (t == qMetaTypeId<QDeclarative1AnchorLine>()) - return IR::AnchorLineType; - else if (t == QDeclarativeMetaType::QQuickAnchorLineMetaTypeId()) + if (t == QDeclarativeMetaType::QQuickAnchorLineMetaTypeId()) { return IR::SGAnchorLineType; - else if (engine->metaObjectForType(t)) { + } else if (engine->metaObjectForType(t)) { return IR::ObjectType; } |