diff options
author | Stephen Kelly <stephen.kelly@kdab.com> | 2012-08-08 10:23:04 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-08-15 17:25:37 +0200 |
commit | 75c649276a9bbcb2e593d6c6f78d77417dd05891 (patch) | |
tree | 2e98537cbbb23f589ea236ba8b23d1965ccbe2b5 /tests/auto/qscriptextqobject/tst_qscriptextqobject.cpp | |
parent | df0ec196031d33850324dc5eeed2d71f61413885 (diff) | |
download | qtscript-75c649276a9bbcb2e593d6c6f78d77417dd05891.tar.gz |
Remove the use of the QWidgetStar metatypeid.
It is to be removed, and is obsoleted by QMetaType::PointerToQObject.
By using QMetaType::PointerToQObject, we also gain the feature
that all pointers to types derived from QObject return true for
QScriptValue::isQObject().
Change-Id: I18392b5b6cde3a45d060c37612d987a5cf8e8f18
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Diffstat (limited to 'tests/auto/qscriptextqobject/tst_qscriptextqobject.cpp')
-rw-r--r-- | tests/auto/qscriptextqobject/tst_qscriptextqobject.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/tests/auto/qscriptextqobject/tst_qscriptextqobject.cpp b/tests/auto/qscriptextqobject/tst_qscriptextqobject.cpp index 9706901..c6fab3d 100644 --- a/tests/auto/qscriptextqobject/tst_qscriptextqobject.cpp +++ b/tests/auto/qscriptextqobject/tst_qscriptextqobject.cpp @@ -1533,7 +1533,6 @@ void tst_QScriptExtQObject::callQtInvokable4() QCOMPARE(m_myObject->qtFunctionInvoked(), 63); QCOMPARE(m_myObject->qtFunctionActuals().size(), 1); QVariant v = m_myObject->qtFunctionActuals().at(0); - QCOMPARE(v.userType(), int(QMetaType::QWidgetStar)); QCOMPARE(qvariant_cast<QWidget*>(v), (QObject *)0); } @@ -1702,7 +1701,7 @@ void tst_QScriptExtQObject::callQtInvokable5() { QScriptValue ret = m_engine->evaluate("myObject.myInvokableReturningMyQObject()"); QCOMPARE(m_myObject->qtFunctionInvoked(), 53); - QVERIFY(ret.isVariant()); + QVERIFY(ret.isQObject()); QCOMPARE(*reinterpret_cast<MyQObject* const *>(ret.toVariant().constData()), m_myObject); } |