aboutsummaryrefslogtreecommitdiffstats
path: root/src/quicklayouts
diff options
context:
space:
mode:
authorMitch Curtis <mitch.curtis@qt.io>2023-05-18 14:37:49 +0800
committerMitch Curtis <mitch.curtis@qt.io>2023-06-05 09:23:42 +0000
commitd62302a3067f45dab6e8803a244c38149849cbf5 (patch)
treef28a6ebc20f2b6fbf26eacd082c66a22113e739c /src/quicklayouts
parentf2173ff6c8b4c335b49720f76eee454cbb54f749 (diff)
QQuickLayout: improve polish loop warning
- Print the layout that caused (or detected) the loop to make finding it easier. Until now it was only possible to find the item by debugging Qt, which is tedious for users. - Replace the module prefix ("Qt Quick Layouts") with a simpler "Layout" prefix, as qmlWarning(this) already ensures that the type name is printed at the beginning of the warning. Pick-to: 6.5 6.6 Change-Id: Ief801cad21958d7a8da406452f2918889f90658f Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
Diffstat (limited to 'src/quicklayouts')
-rw-r--r--src/quicklayouts/qquicklayout.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/quicklayouts/qquicklayout.cpp b/src/quicklayouts/qquicklayout.cpp
index 8510f92a6f..5a6b30ff38 100644
--- a/src/quicklayouts/qquicklayout.cpp
+++ b/src/quicklayouts/qquicklayout.cpp
@@ -845,7 +845,8 @@ void QQuickLayout::invalidate(QQuickItem * /*childItem*/)
qCDebug(lcQuickLayouts) << "QQuickLayout::invalidate(), polish()";
polish();
} else {
- qmlWarning(this) << "Qt Quick Layouts: Polish loop detected. Aborting after two iterations.";
+ qmlWarning(this).nospace() << "Layout polish loop detected for " << this
+ << ". Aborting after two iterations.";
}
}
}