From 961c3714d01f8f3fd81171040784767bf39751ca Mon Sep 17 00:00:00 2001 From: Mitch Curtis Date: Wed, 14 Feb 2018 10:03:26 +0100 Subject: Layout: improve warning message when anchors are detected - Use the more explicit term "manage" to make it clear that the warning only applies to items that are direct children of a layout type. - Instruct users towards the proper way to position items within a layout: Layout.alignment. Change-Id: Id13af95457a689e41aeaead1f9a0f958f095fca9 Reviewed-by: J-P Nurmi --- src/imports/layouts/qquicklayout.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/imports/layouts') 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) -- cgit v1.2.3