aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMitch Curtis <mitch.curtis@qt.io>2023-05-18 14:37:49 +0800
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2023-06-05 13:27:59 +0000
commitf9c67b748e106dfc9a6f863260ed6654795ceb8c (patch)
tree2d2d7f91d9fd7c2459d35feabddc13ce1ad6df64
parent2767ee682a85fdd5e9496f402282d12a57f4aa4a (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. Change-Id: Ief801cad21958d7a8da406452f2918889f90658f Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io> (cherry picked from commit d62302a3067f45dab6e8803a244c38149849cbf5) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-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 64d92d87c7..fc2bcc130c 100644
--- a/src/quicklayouts/qquicklayout.cpp
+++ b/src/quicklayouts/qquicklayout.cpp
@@ -841,7 +841,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.";
}
}
}