aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Arve Sæther <jan-arve.saether@qt.io>2020-04-02 11:36:24 +0200
committerJan Arve Sæther <jan-arve.saether@qt.io>2020-04-02 15:12:15 +0200
commit540c37ecab272d429ed8c66a79c1bd356ea71099 (patch)
treea16d23cc6252cefae68b033360e71fb958475493
parent4355673ace02d5473d51648d6745acc8f07f481a (diff)
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 <mitch.curtis@qt.io>
-rw-r--r--tests/auto/quick/qquicklayouts/data/tst_rowlayout.qml6
1 files changed, 3 insertions, 3 deletions
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)