aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/imports/layouts/qquicklayout.cpp2
-rw-r--r--tests/auto/quick/qquicklayouts/data/tst_rowlayout.qml3
2 files changed, 3 insertions, 2 deletions
diff --git a/src/imports/layouts/qquicklayout.cpp b/src/imports/layouts/qquicklayout.cpp
index c1e34813c6..3bfdea5be7 100644
--- a/src/imports/layouts/qquicklayout.cpp
+++ b/src/imports/layouts/qquicklayout.cpp
@@ -773,7 +773,7 @@ void QQuickLayout::checkAnchors(QQuickItem *item) const
{
QQuickAnchors *anchors = QQuickItemPrivate::get(item)->_anchors;
if (anchors && anchors->activeDirections())
- qmlWarning(item) << "Detected anchors on an item that is part of a layout. This is undefined behavior.";
+ qmlWarning(item) << "Detected anchors on an item that is managed by a layout. This is undefined behavior; use Layout.alignment instead.";
}
void QQuickLayout::itemChange(ItemChange change, const ItemChangeData &value)
diff --git a/tests/auto/quick/qquicklayouts/data/tst_rowlayout.qml b/tests/auto/quick/qquicklayouts/data/tst_rowlayout.qml
index 4e9e41d42e..d6231f28fd 100644
--- a/tests/auto/quick/qquicklayouts/data/tst_rowlayout.qml
+++ b/tests/auto/quick/qquicklayouts/data/tst_rowlayout.qml
@@ -1058,7 +1058,8 @@ Item {
{
var fullPath = Qt.resolvedUrl("tst_rowlayout.qml")
for (var i = 0; i < 7; ++i) {
- ignoreWarning(fullPath + ":" + (1013 + 5*i) +":17: QML Item: Detected anchors on an item that is part of a layout. This is undefined behavior.")
+ ignoreWarning(fullPath + ":" + (1013 + 5*i) +":17: QML Item: Detected anchors on an item that is managed by a layout. "
+ + "This is undefined behavior; use Layout.alignment instead.")
}
var layout = itemsWithAnchorsLayout_Component.createObject(container)
waitForRendering(layout)