Implement debug operator for QDockAreaLayoutItem

QDockAreaLayout items can be widgets, gap or placeholder items.
They appear and disappear during hovering.

This adds a debug operator to make troubleshooting easier.

Task-number: QTBUG-114542
Task-number: QTBUG-112491
Pick-to: 6.6 6.5
Change-Id: I0fa5d3c96ab91838f28ad7cec3c049fd39f47576
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
bb10
Axel Spoerl 2023-06-19 09:57:17 +02:00
parent 96e1381a0a
commit faec937756
2 changed files with 16 additions and 0 deletions

View File

@ -171,6 +171,21 @@ QDockAreaLayoutItem
return *this;
}
QDebug QDockAreaLayoutItem::operator<<(QDebug dbg)
{
QDebugStateSaver saver(dbg);
dbg.nospace();
dbg << "QDockAreaLayoutItem(" << static_cast<void *>(this) << "->";
if (widgetItem)
dbg << "widgetItem(" << widgetItem->widget() << ")";
else if (subinfo)
dbg << "subInfo(" << subinfo << ")";
else if (placeHolderItem)
dbg << "placeHolderItem(" << placeHolderItem << ")";
dbg << ")";
return dbg;
}
/******************************************************************************
** QDockAreaLayoutInfo
*/

View File

@ -73,6 +73,7 @@ struct Q_AUTOTEST_EXPORT QDockAreaLayoutItem
int pos;
int size;
uint flags;
QDebug operator<<(QDebug dbg);
};
class Q_AUTOTEST_EXPORT QPlaceHolderItem