aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMitch Curtis <mitch.curtis@qt.io>2024-03-29 15:33:08 +0800
committerMitch Curtis <mitch.curtis@qt.io>2024-04-17 18:27:35 +0800
commitec4fc89c5f338ba9e809e729be816ab160dcc064 (patch)
tree24fdff4eac50e4ad403d1de5255c6b53f8028543 /tests
parent9da3750ad88847671f3b95954fabeeceacf392aa (diff)
Layouts: reimplement toString() for better warning messages
When combined with the patch in qtbase that adds the virtual toString function to QGridLayoutItem, this turns the following warning QGridLayoutEngine::addItem: Cell (1, 0) already taken into the much more informative QGridLayoutEngine::addItem: Can't add QQuickRectangle(0x6110000d5100, id="r4", parent=0x6110000d4ac0, geometry=0,0 20x20) at cell (1, 0) because it's already taken by QQuickRectangle(0x6110000d4e80, id="r2", parent=0x6110000d4ac0, geometry=0,0 20x20) This makes it easier to see which item warnings are referring to. Change-Id: I80a85b77abcb404fb0d6bc622baa1be3cd9e0df5 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/quick/qquicklayouts/data/tst_gridlayout.qml2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/auto/quick/qquicklayouts/data/tst_gridlayout.qml b/tests/auto/quick/qquicklayouts/data/tst_gridlayout.qml
index d03a8006b4..f311cc34d6 100644
--- a/tests/auto/quick/qquicklayouts/data/tst_gridlayout.qml
+++ b/tests/auto/quick/qquicklayouts/data/tst_gridlayout.qml
@@ -208,7 +208,7 @@ Item {
}
function test_flowLeftToRightDefaultPositions() {
- ignoreWarning("QGridLayoutEngine::addItem: Cell (1, 0) already taken");
+ ignoreWarning(/QGridLayoutEngine::addItem: Can't add .* at cell \(1, 0\) because it's already taken by .*/);
var layout = createTemporaryObject(layout_flowLeftToRightDefaultPositions_Component, container);
compare(layout.implicitWidth, 40);
compare(layout.children[0].x, 0);