diff options
author | Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com> | 2015-10-19 13:01:13 +0200 |
---|---|---|
committer | Mitch Curtis <mitch.curtis@theqtcompany.com> | 2015-10-22 09:24:27 +0000 |
commit | ddc8537ec17591e4b51293523c1369823ecd8a83 (patch) | |
tree | 05f934c995cb0f8bb974eafa91773da05d9ef194 /tests/auto/quick/qquickitem2 | |
parent | 8ee3673e439b4499a8a4a4280637ee0270c4a54a (diff) |
QQuickItem: Make setParent() error message more useful
Change-Id: Ie39b7ee91024b6b090fce2b58bb240cbae724b8f
Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
Diffstat (limited to 'tests/auto/quick/qquickitem2')
-rw-r--r-- | tests/auto/quick/qquickitem2/tst_qquickitem.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/auto/quick/qquickitem2/tst_qquickitem.cpp b/tests/auto/quick/qquickitem2/tst_qquickitem.cpp index f3351fcc4e..aa0b5b7693 100644 --- a/tests/auto/quick/qquickitem2/tst_qquickitem.cpp +++ b/tests/auto/quick/qquickitem2/tst_qquickitem.cpp @@ -2721,7 +2721,10 @@ void tst_QQuickItem::parentLoop() { QQuickView *window = new QQuickView(0); - QTest::ignoreMessage(QtWarningMsg, "QQuickItem::setParentItem: Parent is already part of this items subtree."); +#ifndef QT_NO_REGULAREXPRESSION + QRegularExpression msgRegexp = QRegularExpression("QQuickItem::setParentItem: Parent QQuickItem\\(.*\\) is already part of the subtree of QQuickItem\\(.*\\)"); + QTest::ignoreMessage(QtWarningMsg, msgRegexp); +#endif window->setSource(testFileUrl("parentLoop.qml")); QQuickItem *root = qobject_cast<QQuickItem*>(window->rootObject()); |