QDockArealLayoutItem: recurse subinfo in QDebug operator<<

A subinfo has its own item list. Recurse into it when debugging.

Task-number: QTBUG-115058
Pick-to: 6.6 6.5
Change-Id: Ide820e4440caa97b84a3366c2d385546fb6026ec
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
This commit is contained in:
Axel Spoerl 2023-08-11 11:04:24 +02:00
parent e03bc88a80
commit efc4bf5e63

View File

@ -177,12 +177,13 @@ QDebug operator<<(QDebug dbg, const QDockAreaLayoutItem &item)
QDebugStateSaver saver(dbg); QDebugStateSaver saver(dbg);
dbg.nospace(); dbg.nospace();
dbg << "QDockAreaLayoutItem(" << static_cast<const void *>(&item) << "->"; dbg << "QDockAreaLayoutItem(" << static_cast<const void *>(&item) << "->";
if (item.widgetItem) if (item.widgetItem) {
dbg << "widgetItem(" << item.widgetItem->widget() << ")"; dbg << "widgetItem(" << item.widgetItem->widget() << ")";
else if (item.subinfo) } else if (item.subinfo) {
dbg << "subInfo(" << item.subinfo << ")"; dbg << "subInfo(" << item.subinfo << "->(" << item.subinfo->item_list << ")";
else if (item.placeHolderItem) } else if (item.placeHolderItem) {
dbg << "placeHolderItem(" << item.placeHolderItem << ")"; dbg << "placeHolderItem(" << item.placeHolderItem << ")";
}
dbg << ")"; dbg << ")";
return dbg; return dbg;
} }