diff options
author | Warwick Allison <warwick.allison@nokia.com> | 2009-12-09 04:25:05 (GMT) |
---|---|---|
committer | Warwick Allison <warwick.allison@nokia.com> | 2009-12-09 04:25:05 (GMT) |
commit | 611bd1247ff8254c567dc2c50573e84093dd8c5a (patch) | |
tree | 8591210aef09bae2250bad6e5f0c63827536b229 /tests | |
parent | 0a1a4915307b023ce0eb7c34ba8960a1260f7798 (diff) | |
download | Qt-611bd1247ff8254c567dc2c50573e84093dd8c5a.zip Qt-611bd1247ff8254c567dc2c50573e84093dd8c5a.tar.gz Qt-611bd1247ff8254c567dc2c50573e84093dd8c5a.tar.bz2 |
print error message
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/declarative/valuetypes/tst_valuetypes.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/auto/declarative/valuetypes/tst_valuetypes.cpp b/tests/auto/declarative/valuetypes/tst_valuetypes.cpp index d42bfc5..1a5d7b6 100644 --- a/tests/auto/declarative/valuetypes/tst_valuetypes.cpp +++ b/tests/auto/declarative/valuetypes/tst_valuetypes.cpp @@ -474,11 +474,23 @@ void tst_valuetypes::valueSources() delete object; } +static void checkNoErrors(QmlComponent& component) +{ + QList<QmlError> errors = component.errors(); + if (errors.isEmpty()) + return; + for (int ii = 0; ii < errors.count(); ++ii) { + const QmlError &error = errors.at(ii); + qWarning("%d:%d:%s",error.line(),error.column(),error.description().toUtf8().constData()); + } +} + // Test that property value interceptors can be applied to value types void tst_valuetypes::valueInterceptors() { QmlComponent component(&engine, TEST_FILE("valueInterceptors.qml")); MyTypeObject *object = qobject_cast<MyTypeObject *>(component.create()); + checkNoErrors(component); QVERIFY(object != 0); QCOMPARE(object->rect().x(), 26); |