aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKent Hansen <kent.hansen@nokia.com>2012-01-26 15:04:51 +0100
committerQt by Nokia <qt-info@nokia.com>2012-01-26 15:35:12 +0100
commit40c8da550cac90460970f1dbdca1e6f02be99a8c (patch)
tree3009847e74c769d7f79fba854b598aa5ea49a914
parentccc18c27b18a07e0e3b971fe81919ca57e63c5d2 (diff)
Fix breakage due to meta-type id reordering in qtbase
Commit aee1f6cc413f56bf4962324799ee3887c3dd037f in qtbase changed the order/IDs of the "extended" meta-types, so that they are not bigger than QVariant::UserType (127) anymore. This caused autotests in qtdeclarative to assert/fail. Ths commit adapts the logic in qtdeclarative accordingly, in particular so that QVariant/QObjectStar aren't treated as value types. Change-Id: I3e6c0b2c9fb04bfd7f7fd94da2741f9536229b87 Reviewed-by: Kai Koehne <kai.koehne@nokia.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
-rw-r--r--src/declarative/qml/qdeclarativevaluetype.cpp8
-rw-r--r--tests/auto/declarative/debugger/qdeclarativeenginedebug/tst_qdeclarativeenginedebug.cpp2
2 files changed, 8 insertions, 2 deletions
diff --git a/src/declarative/qml/qdeclarativevaluetype.cpp b/src/declarative/qml/qdeclarativevaluetype.cpp
index 9e5dc9040a..12ee78edd0 100644
--- a/src/declarative/qml/qdeclarativevaluetype.cpp
+++ b/src/declarative/qml/qdeclarativevaluetype.cpp
@@ -92,8 +92,14 @@ QDeclarativeValueTypeFactory::~QDeclarativeValueTypeFactory()
bool QDeclarativeValueTypeFactory::isValueType(int idx)
{
- if ((uint)idx < QVariant::UserType && (uint)idx != QVariant::StringList)
+ if ((uint)idx < QVariant::UserType
+ && idx != QVariant::StringList
+ && idx != QMetaType::QObjectStar
+ && idx != QMetaType::QWidgetStar
+ && idx != QMetaType::VoidStar
+ && idx != QMetaType::QVariant) {
return true;
+ }
return false;
}
diff --git a/tests/auto/declarative/debugger/qdeclarativeenginedebug/tst_qdeclarativeenginedebug.cpp b/tests/auto/declarative/debugger/qdeclarativeenginedebug/tst_qdeclarativeenginedebug.cpp
index 83c092b8b0..446ad8b669 100644
--- a/tests/auto/declarative/debugger/qdeclarativeenginedebug/tst_qdeclarativeenginedebug.cpp
+++ b/tests/auto/declarative/debugger/qdeclarativeenginedebug/tst_qdeclarativeenginedebug.cpp
@@ -229,7 +229,7 @@ void tst_QDeclarativeEngineDebug::recursiveObjectTest(QObject *o, const QDeclara
QCOMPARE(p.name(), QString::fromUtf8(pmeta.name()));
- if (pmeta.type() < QVariant::UserType) // TODO test complex types
+ if (pmeta.type() < QVariant::UserType && pmeta.userType() != QMetaType::QVariant) // TODO test complex types
QCOMPARE(p.value(), pmeta.read(o));
if (p.name() == "parent")