From 540c37ecab272d429ed8c66a79c1bd356ea71099 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Arve=20S=C3=A6ther?= Date: Thu, 2 Apr 2020 11:36:24 +0200 Subject: Do not match for line numbers in the source code in ignoreWarning() It makes it very volatile to source code changes.. Use the RegExp variant of ignoreWarning() instead. Change-Id: I9a9a26e844d5e7e30289d3843c89a9e6724f9f71 Reviewed-by: Mitch Curtis --- tests/auto/quick/qquicklayouts/data/tst_rowlayout.qml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tests/auto/quick/qquicklayouts') diff --git a/tests/auto/quick/qquicklayouts/data/tst_rowlayout.qml b/tests/auto/quick/qquicklayouts/data/tst_rowlayout.qml index 0732884c97..f61e2e0f48 100644 --- a/tests/auto/quick/qquicklayouts/data/tst_rowlayout.qml +++ b/tests/auto/quick/qquicklayouts/data/tst_rowlayout.qml @@ -118,10 +118,10 @@ Item { function test_warnAboutLayoutItemsWithAnchors() { - var fullPath = Qt.resolvedUrl("tst_rowlayout.qml") + var regex = new RegExp("QML Item: Detected anchors on an item that is managed by a layout. " + + "This is undefined behavior; use Layout.alignment instead.") for (var i = 0; i < 7; ++i) { - ignoreWarning(fullPath + ":" + (75 + 5*i) +":17: QML Item: Detected anchors on an item that is managed by a layout. " - + "This is undefined behavior; use Layout.alignment instead.") + ignoreWarning(regex) } var layout = itemsWithAnchorsLayout_Component.createObject(container) waitForRendering(layout) -- cgit v1.2.3