forked from qt-creator/qt-creator
QuickDesigner: Make metainfo system robust for different version numbers
With the inclusion of org.webkit 1.0 types some common ancestors are shared with different version numbers. These used to override each other. With this patch the hierarchy is preserved. This commit includes several changes by Marco Bubke. Reviewed-by: Marco Bubke
This commit is contained in:
@@ -72,11 +72,12 @@ public:
|
|||||||
void parseQmlTypes();
|
void parseQmlTypes();
|
||||||
void parseNonQmlTypes();
|
void parseNonQmlTypes();
|
||||||
void parseValueTypes();
|
void parseValueTypes();
|
||||||
void parseNonQmlClassRecursively(const QMetaObject *qMetaObject, int majorVersion, int minorVersion);
|
void parseNonQmlClassRecursively(const QMetaObject *qMetaObject);
|
||||||
void parseProperties(NodeMetaInfo &nodeMetaInfo, const QMetaObject *qMetaObject) const;
|
void parseProperties(NodeMetaInfo &nodeMetaInfo, const QMetaObject *qMetaObject) const;
|
||||||
void parseClassInfo(NodeMetaInfo &nodeMetaInfo, const QMetaObject *qMetaObject) const;
|
void parseClassInfo(NodeMetaInfo &nodeMetaInfo, const QMetaObject *qMetaObject) const;
|
||||||
|
|
||||||
QString typeName(const QMetaObject *qMetaObject) const;
|
QList<QDeclarativeType*> qmlTypes();
|
||||||
|
void typeInfo(const QMetaObject *qMetaObject, QString *typeName, int *majorVersion = 0, int *minorVersion = 0) const;
|
||||||
|
|
||||||
void parseXmlFiles();
|
void parseXmlFiles();
|
||||||
|
|
||||||
@@ -125,7 +126,7 @@ void MetaInfoPrivate::initialize()
|
|||||||
void MetaInfoPrivate::loadPlugins(QDeclarativeEngine *engine)
|
void MetaInfoPrivate::loadPlugins(QDeclarativeEngine *engine)
|
||||||
{
|
{
|
||||||
// hack to load plugins
|
// hack to load plugins
|
||||||
QDeclarativeComponent pluginComponent(engine);
|
QDeclarativeComponent pluginComponent(engine, 0);
|
||||||
|
|
||||||
QStringList pluginList;
|
QStringList pluginList;
|
||||||
pluginList += "import Qt 4.7";
|
pluginList += "import Qt 4.7";
|
||||||
@@ -139,6 +140,7 @@ void MetaInfoPrivate::loadPlugins(QDeclarativeEngine *engine)
|
|||||||
|
|
||||||
QString componentString = QString("%1\n Item {}\n").arg(pluginList.join("\n"));
|
QString componentString = QString("%1\n Item {}\n").arg(pluginList.join("\n"));
|
||||||
|
|
||||||
|
|
||||||
pluginComponent.setData(componentString.toLatin1(), QUrl());
|
pluginComponent.setData(componentString.toLatin1(), QUrl());
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -206,48 +208,83 @@ void MetaInfoPrivate::parseClassInfo(NodeMetaInfo &nodeMetaInfo, const QMetaObje
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void MetaInfoPrivate::parseNonQmlClassRecursively(const QMetaObject *qMetaObject, int majorVersion, int minorVersion)
|
void MetaInfoPrivate::parseNonQmlClassRecursively(const QMetaObject *qMetaObject)
|
||||||
{
|
{
|
||||||
Q_ASSERT_X(qMetaObject, Q_FUNC_INFO, "invalid QMetaObject");
|
Q_ASSERT_X(qMetaObject, Q_FUNC_INFO, "invalid QMetaObject");
|
||||||
const QString className = qMetaObject->className();
|
|
||||||
|
|
||||||
if (className.isEmpty()) {
|
QString typeName;
|
||||||
|
int majorVersion = -1;
|
||||||
|
int minorVersion = -1;
|
||||||
|
typeInfo(qMetaObject, &typeName, &majorVersion, &minorVersion);
|
||||||
|
|
||||||
|
if (typeName.isEmpty()) {
|
||||||
qWarning() << "Meta type system: Registered class has no name.";
|
qWarning() << "Meta type system: Registered class has no name.";
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!m_q->hasNodeMetaInfo(typeName(qMetaObject), majorVersion, minorVersion)) {
|
NodeMetaInfo existingInfo = m_q->nodeMetaInfo(typeName, majorVersion, minorVersion);
|
||||||
|
if (existingInfo.isValid()
|
||||||
|
&& existingInfo.majorVersion() == majorVersion
|
||||||
|
&& existingInfo.minorVersion() == minorVersion) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
NodeMetaInfo nodeMetaInfo(*m_q);
|
NodeMetaInfo nodeMetaInfo(*m_q);
|
||||||
nodeMetaInfo.setType(typeName(qMetaObject), majorVersion, minorVersion);
|
nodeMetaInfo.setType(typeName, majorVersion, minorVersion);
|
||||||
parseProperties(nodeMetaInfo, qMetaObject);
|
parseProperties(nodeMetaInfo, qMetaObject);
|
||||||
parseClassInfo(nodeMetaInfo, qMetaObject);
|
parseClassInfo(nodeMetaInfo, qMetaObject);
|
||||||
|
|
||||||
|
QString superTypeName;
|
||||||
|
int superTypeMajorVersion = -1;
|
||||||
|
int superTypeMinorVersion = -1;
|
||||||
|
|
||||||
|
if (qMetaObject->superClass()) {
|
||||||
|
typeInfo(qMetaObject->superClass(), &superTypeName, &superTypeMajorVersion, &superTypeMinorVersion);
|
||||||
|
nodeMetaInfo.setSuperClass(superTypeName, superTypeMajorVersion, superTypeMinorVersion);
|
||||||
|
}
|
||||||
if (debug)
|
if (debug)
|
||||||
qDebug() << "adding non qml type" << nodeMetaInfo.typeName() << nodeMetaInfo.majorVersion() << nodeMetaInfo.minorVersion() << ", parent type" << typeName(qMetaObject->superClass());
|
qDebug() << "adding non qml type" << nodeMetaInfo.typeName() << nodeMetaInfo.majorVersion() << nodeMetaInfo.minorVersion()
|
||||||
if (qMetaObject->superClass())
|
<< ", parent type" << superTypeName << superTypeMajorVersion << superTypeMinorVersion;
|
||||||
nodeMetaInfo.setSuperClass(typeName(qMetaObject->superClass()));
|
|
||||||
|
|
||||||
m_q->addNodeInfo(nodeMetaInfo);
|
m_q->addNodeInfo(nodeMetaInfo);
|
||||||
}
|
|
||||||
|
|
||||||
if (const QMetaObject *superClass = qMetaObject->superClass()) {
|
if (const QMetaObject *superClass = qMetaObject->superClass())
|
||||||
parseNonQmlClassRecursively(superClass, majorVersion, minorVersion);
|
parseNonQmlClassRecursively(superClass);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QList<QDeclarativeType*> MetaInfoPrivate::qmlTypes()
|
||||||
QString MetaInfoPrivate::typeName(const QMetaObject *qMetaObject) const
|
|
||||||
{
|
{
|
||||||
if (!qMetaObject)
|
QList<QDeclarativeType*> list;
|
||||||
return QString();
|
foreach (QDeclarativeType *type, QDeclarativeMetaType::qmlTypes()) {
|
||||||
QString className = qMetaObject->className();
|
if (!type->qmlTypeName().startsWith("Bauhaus/")
|
||||||
if (QDeclarativeType *qmlType = QDeclarativeMetaType::qmlType(qMetaObject)) {
|
&& !type->qmlTypeName().startsWith("QmlProject/"))
|
||||||
QString qmlClassName(qmlType->qmlTypeName());
|
list += type;
|
||||||
if (!qmlClassName.isEmpty())
|
|
||||||
className = qmlType->qmlTypeName(); // Ensure that we always use the qml name,
|
|
||||||
// if available.
|
|
||||||
}
|
}
|
||||||
return className;
|
return list;
|
||||||
|
}
|
||||||
|
|
||||||
|
void MetaInfoPrivate::typeInfo(const QMetaObject *qMetaObject, QString *typeName, int *majorVersion, int *minorVersion) const
|
||||||
|
{
|
||||||
|
Q_ASSERT(typeName);
|
||||||
|
|
||||||
|
if (!qMetaObject)
|
||||||
|
return;
|
||||||
|
|
||||||
|
*typeName = qMetaObject->className();
|
||||||
|
int majVersion = -1;
|
||||||
|
int minVersion = -1;
|
||||||
|
QDeclarativeType *qmlType = QDeclarativeMetaType::qmlType(qMetaObject);
|
||||||
|
if (qmlType) {
|
||||||
|
if (!qmlType->qmlTypeName().isEmpty()) {
|
||||||
|
*typeName = qmlType->qmlTypeName();
|
||||||
|
majVersion = qmlType->majorVersion();
|
||||||
|
minVersion = qmlType->minorVersion();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (majorVersion)
|
||||||
|
*majorVersion = majVersion;
|
||||||
|
if (minorVersion)
|
||||||
|
*minorVersion = minVersion;
|
||||||
}
|
}
|
||||||
|
|
||||||
void MetaInfoPrivate::parseValueTypes()
|
void MetaInfoPrivate::parseValueTypes()
|
||||||
@@ -303,12 +340,12 @@ void MetaInfoPrivate::parseValueTypes()
|
|||||||
|
|
||||||
void MetaInfoPrivate::parseQmlTypes()
|
void MetaInfoPrivate::parseQmlTypes()
|
||||||
{
|
{
|
||||||
foreach (QDeclarativeType *qmlType, QDeclarativeMetaType::qmlTypes()) {
|
foreach (QDeclarativeType *qmlType, qmlTypes()) {
|
||||||
const QString qtTypeName(qmlType->typeName());
|
const QString qtTypeName(qmlType->typeName());
|
||||||
const QString qmlTypeName(qmlType->qmlTypeName());
|
const QString qmlTypeName(qmlType->qmlTypeName());
|
||||||
m_QtTypesToQmlTypes.insert(qtTypeName, qmlTypeName);
|
m_QtTypesToQmlTypes.insert(qtTypeName, qmlTypeName);
|
||||||
}
|
}
|
||||||
foreach (QDeclarativeType *qmlType, QDeclarativeMetaType::qmlTypes()) {
|
foreach (QDeclarativeType *qmlType, qmlTypes()) {
|
||||||
const QMetaObject *qMetaObject = qmlType->metaObject();
|
const QMetaObject *qMetaObject = qmlType->metaObject();
|
||||||
|
|
||||||
// parseQmlTypes is called iteratively e.g. when plugins are loaded
|
// parseQmlTypes is called iteratively e.g. when plugins are loaded
|
||||||
@@ -319,32 +356,42 @@ void MetaInfoPrivate::parseQmlTypes()
|
|||||||
nodeMetaInfo.setType(qmlType->qmlTypeName(), qmlType->majorVersion(), qmlType->minorVersion());
|
nodeMetaInfo.setType(qmlType->qmlTypeName(), qmlType->majorVersion(), qmlType->minorVersion());
|
||||||
|
|
||||||
parseProperties(nodeMetaInfo, qMetaObject);
|
parseProperties(nodeMetaInfo, qMetaObject);
|
||||||
parseClassInfo(nodeMetaInfo, qMetaObject);
|
|
||||||
|
|
||||||
QString superTypeName = typeName(qMetaObject->superClass());
|
|
||||||
if (qmlType->baseMetaObject() != qMetaObject) {
|
if (qmlType->baseMetaObject() != qMetaObject) {
|
||||||
// type is declared with Q_DECLARE_EXTENDED_TYPE
|
// type is declared with Q_DECLARE_EXTENDED_TYPE
|
||||||
// also parse properties of original type
|
|
||||||
parseProperties(nodeMetaInfo, qmlType->baseMetaObject());
|
parseProperties(nodeMetaInfo, qmlType->baseMetaObject());
|
||||||
superTypeName = typeName(qmlType->baseMetaObject()->superClass());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
nodeMetaInfo.setSuperClass(superTypeName);
|
parseClassInfo(nodeMetaInfo, qMetaObject);
|
||||||
|
|
||||||
|
QString superTypeName;
|
||||||
|
int superTypeMajorVersion = -1;
|
||||||
|
int superTypeMinorVersion = -1;
|
||||||
|
if (const QMetaObject *superClassObject = qmlType->baseMetaObject()->superClass())
|
||||||
|
typeInfo(superClassObject, &superTypeName, &superTypeMajorVersion, &superTypeMinorVersion);
|
||||||
|
|
||||||
|
if (!superTypeName.isEmpty())
|
||||||
|
nodeMetaInfo.setSuperClass(superTypeName, superTypeMajorVersion, superTypeMinorVersion);
|
||||||
|
|
||||||
|
if (debug) {
|
||||||
|
qDebug() << "adding qml type" << nodeMetaInfo.typeName() << nodeMetaInfo.majorVersion() << nodeMetaInfo.minorVersion()
|
||||||
|
<< ", super class" << superTypeName << superTypeMajorVersion << superTypeMinorVersion;
|
||||||
|
}
|
||||||
|
|
||||||
if (debug)
|
|
||||||
qDebug() << "adding qml type" << nodeMetaInfo.typeName() << nodeMetaInfo.majorVersion() << nodeMetaInfo.minorVersion() << "super class" << superTypeName;
|
|
||||||
m_q->addNodeInfo(nodeMetaInfo);
|
m_q->addNodeInfo(nodeMetaInfo);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void MetaInfoPrivate::parseNonQmlTypes()
|
void MetaInfoPrivate::parseNonQmlTypes()
|
||||||
{
|
{
|
||||||
foreach (QDeclarativeType *qmlType, QDeclarativeMetaType::qmlTypes()) {
|
foreach (QDeclarativeType *qmlType, qmlTypes()) {
|
||||||
if (!qmlType->qmlTypeName().contains("Bauhaus"))
|
if (qmlType->qmlTypeName().startsWith("Bauhaus/")
|
||||||
parseNonQmlClassRecursively(qmlType->metaObject(), qmlType->majorVersion(), qmlType->minorVersion());
|
|| qmlType->qmlTypeName().startsWith("QmlProject/"))
|
||||||
|
continue;
|
||||||
|
if (qmlType->metaObject()->superClass())
|
||||||
|
parseNonQmlClassRecursively(qmlType->metaObject()->superClass());
|
||||||
}
|
}
|
||||||
|
|
||||||
parseNonQmlClassRecursively(&QDeclarativeAnchors::staticMetaObject, -1, -1);
|
parseNonQmlClassRecursively(&QDeclarativeAnchors::staticMetaObject);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -429,12 +476,14 @@ MetaInfo& MetaInfo::operator=(const MetaInfo &other)
|
|||||||
bool MetaInfo::hasNodeMetaInfo(const QString &typeName, int majorVersion, int minorVersion) const
|
bool MetaInfo::hasNodeMetaInfo(const QString &typeName, int majorVersion, int minorVersion) const
|
||||||
{
|
{
|
||||||
foreach (const NodeMetaInfo &info, m_p->m_nodeMetaInfoHash.values(typeName)) {
|
foreach (const NodeMetaInfo &info, m_p->m_nodeMetaInfoHash.values(typeName)) {
|
||||||
if (info.availableInVersion(majorVersion, minorVersion)) {
|
if (info.availableInVersion(majorVersion, minorVersion)) { {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (!isGlobal())
|
if (!isGlobal())
|
||||||
return global().hasNodeMetaInfo(typeName);
|
return global().hasNodeMetaInfo(typeName);
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -443,16 +492,21 @@ bool MetaInfo::hasNodeMetaInfo(const QString &typeName, int majorVersion, int mi
|
|||||||
*/
|
*/
|
||||||
NodeMetaInfo MetaInfo::nodeMetaInfo(const QString &typeName, int majorVersion, int minorVersion) const
|
NodeMetaInfo MetaInfo::nodeMetaInfo(const QString &typeName, int majorVersion, int minorVersion) const
|
||||||
{
|
{
|
||||||
|
NodeMetaInfo returnInfo;
|
||||||
foreach (const NodeMetaInfo &info, m_p->m_nodeMetaInfoHash.values(typeName)) {
|
foreach (const NodeMetaInfo &info, m_p->m_nodeMetaInfoHash.values(typeName)) {
|
||||||
// todo: The order for different types for different versions is random here.
|
|
||||||
if (info.availableInVersion(majorVersion, minorVersion)) {
|
if (info.availableInVersion(majorVersion, minorVersion)) {
|
||||||
return info;
|
if (!returnInfo.isValid()
|
||||||
|
|| returnInfo.majorVersion() < info.majorVersion()
|
||||||
|
|| (returnInfo.majorVersion() == info.minorVersion()
|
||||||
|
&& returnInfo.minorVersion() < info.minorVersion()))
|
||||||
|
returnInfo = info;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!isGlobal())
|
if (!returnInfo.isValid()
|
||||||
|
&& !isGlobal())
|
||||||
return global().nodeMetaInfo(typeName);
|
return global().nodeMetaInfo(typeName);
|
||||||
|
|
||||||
return NodeMetaInfo();
|
return returnInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
QString MetaInfo::fromQtTypes(const QString &type) const
|
QString MetaInfo::fromQtTypes(const QString &type) const
|
||||||
|
|||||||
@@ -3610,8 +3610,12 @@ void TestCore::testMetaInfo()
|
|||||||
// test whether default type is registered
|
// test whether default type is registered
|
||||||
QVERIFY(model->metaInfo().hasNodeMetaInfo("Qt/Item", 4, 7));
|
QVERIFY(model->metaInfo().hasNodeMetaInfo("Qt/Item", 4, 7));
|
||||||
|
|
||||||
// test whether types from plugins are loaded
|
// test whether types from plugins are registered
|
||||||
QVERIFY(model->metaInfo().hasNodeMetaInfo("org.webkit/WebView", 1, 0));
|
QVERIFY(model->metaInfo().hasNodeMetaInfo("org.webkit/WebView", 1, 0));
|
||||||
|
|
||||||
|
// test whether non-qml type is registered
|
||||||
|
QVERIFY(model->metaInfo().hasNodeMetaInfo("QGraphicsObject", 4, 7)); // Qt 4.7 namespace
|
||||||
|
QVERIFY(model->metaInfo().hasNodeMetaInfo("QGraphicsObject", 1, 0)); // webkit 1.0 namespace
|
||||||
}
|
}
|
||||||
|
|
||||||
void TestCore::testMetaInfoSimpleType()
|
void TestCore::testMetaInfoSimpleType()
|
||||||
@@ -3625,11 +3629,11 @@ void TestCore::testMetaInfoSimpleType()
|
|||||||
QScopedPointer<Model> model(Model::create("Qt/Item"));
|
QScopedPointer<Model> model(Model::create("Qt/Item"));
|
||||||
QVERIFY(model.data());
|
QVERIFY(model.data());
|
||||||
|
|
||||||
QVERIFY(model->metaInfo().hasNodeMetaInfo("Qt/Item"));
|
QVERIFY(model->metaInfo().hasNodeMetaInfo("Qt/Item", 4, 7));
|
||||||
QVERIFY(model->metaInfo().hasNodeMetaInfo("Qt/Item", 4, 7));
|
QVERIFY(model->metaInfo().hasNodeMetaInfo("Qt/Item", 4, 7));
|
||||||
|
|
||||||
NodeMetaInfo itemMetaInfo = model->metaInfo().nodeMetaInfo("Qt/Item", 4, 7);
|
NodeMetaInfo itemMetaInfo = model->metaInfo().nodeMetaInfo("Qt/Item", 4, 7);
|
||||||
NodeMetaInfo itemMetaInfo2 = model->metaInfo().nodeMetaInfo("Qt/Item");
|
NodeMetaInfo itemMetaInfo2 = model->metaInfo().nodeMetaInfo("Qt/Item", 4, 7);
|
||||||
QCOMPARE(itemMetaInfo, itemMetaInfo2);
|
QCOMPARE(itemMetaInfo, itemMetaInfo2);
|
||||||
|
|
||||||
QVERIFY(itemMetaInfo.isValid());
|
QVERIFY(itemMetaInfo.isValid());
|
||||||
@@ -3641,12 +3645,12 @@ void TestCore::testMetaInfoSimpleType()
|
|||||||
NodeMetaInfo graphicsObjectInfo = itemMetaInfo.directSuperClass();
|
NodeMetaInfo graphicsObjectInfo = itemMetaInfo.directSuperClass();
|
||||||
QVERIFY(graphicsObjectInfo.isValid());
|
QVERIFY(graphicsObjectInfo.isValid());
|
||||||
QCOMPARE(graphicsObjectInfo.typeName(), QLatin1String("QGraphicsObject"));
|
QCOMPARE(graphicsObjectInfo.typeName(), QLatin1String("QGraphicsObject"));
|
||||||
QCOMPARE(graphicsObjectInfo.majorVersion(), 4);
|
QCOMPARE(graphicsObjectInfo.majorVersion(), -1);
|
||||||
QCOMPARE(graphicsObjectInfo.minorVersion(), 7);
|
QCOMPARE(graphicsObjectInfo.minorVersion(), -1);
|
||||||
|
|
||||||
QCOMPARE(itemMetaInfo.superClasses().size(), 2); // QGraphicsObject, Qt/QtObject
|
QCOMPARE(itemMetaInfo.superClasses().size(), 2); // QGraphicsObject, Qt/QtObject
|
||||||
QVERIFY(itemMetaInfo.isSubclassOf("QGraphicsObject", 4, 7));
|
QVERIFY(itemMetaInfo.isSubclassOf("QGraphicsObject", 4, 7));
|
||||||
QVERIFY(itemMetaInfo.isSubclassOf("Qt/QtObject", -1, -1));
|
QVERIFY(itemMetaInfo.isSubclassOf("Qt/QtObject", 4, 7));
|
||||||
|
|
||||||
// availableInVersion
|
// availableInVersion
|
||||||
QVERIFY(itemMetaInfo.availableInVersion(4, 7));
|
QVERIFY(itemMetaInfo.availableInVersion(4, 7));
|
||||||
@@ -3704,8 +3708,8 @@ void TestCore::testMetaInfoExtendedType()
|
|||||||
NodeMetaInfo graphicsObjectTypeInfo = graphicsWidgetTypeInfo.directSuperClass();
|
NodeMetaInfo graphicsObjectTypeInfo = graphicsWidgetTypeInfo.directSuperClass();
|
||||||
QVERIFY(graphicsObjectTypeInfo.isValid());
|
QVERIFY(graphicsObjectTypeInfo.isValid());
|
||||||
QCOMPARE(graphicsObjectTypeInfo.typeName(), QLatin1String("QGraphicsObject"));
|
QCOMPARE(graphicsObjectTypeInfo.typeName(), QLatin1String("QGraphicsObject"));
|
||||||
QCOMPARE(graphicsObjectTypeInfo.majorVersion(), 4);
|
QCOMPARE(graphicsObjectTypeInfo.majorVersion(), -1);
|
||||||
QCOMPARE(graphicsObjectTypeInfo.minorVersion(), 7);
|
QCOMPARE(graphicsObjectTypeInfo.minorVersion(), -1);
|
||||||
QCOMPARE(graphicsWidgetTypeInfo.superClasses().size(), 2);
|
QCOMPARE(graphicsWidgetTypeInfo.superClasses().size(), 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3736,8 +3740,8 @@ void TestCore::testMetaInfoCustomType()
|
|||||||
NodeMetaInfo stateOperationInfo = propertyChangesInfo.directSuperClass();
|
NodeMetaInfo stateOperationInfo = propertyChangesInfo.directSuperClass();
|
||||||
QVERIFY(stateOperationInfo.isValid());
|
QVERIFY(stateOperationInfo.isValid());
|
||||||
QCOMPARE(stateOperationInfo.typeName(), QLatin1String("QDeclarativeStateOperation"));
|
QCOMPARE(stateOperationInfo.typeName(), QLatin1String("QDeclarativeStateOperation"));
|
||||||
QCOMPARE(stateOperationInfo.majorVersion(), 4);
|
QCOMPARE(stateOperationInfo.majorVersion(), -1);
|
||||||
QCOMPARE(stateOperationInfo.minorVersion(), 7);
|
QCOMPARE(stateOperationInfo.minorVersion(), -1);
|
||||||
QCOMPARE(propertyChangesInfo.superClasses().size(), 2);
|
QCOMPARE(propertyChangesInfo.superClasses().size(), 2);
|
||||||
|
|
||||||
// DeclarativePropertyChanges just has 3 properties
|
// DeclarativePropertyChanges just has 3 properties
|
||||||
|
|||||||
Reference in New Issue
Block a user