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
parent
96e1381a0a
commit
faec937756
|
|
@ -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
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -73,6 +73,7 @@ struct Q_AUTOTEST_EXPORT QDockAreaLayoutItem
|
|||
int pos;
|
||||
int size;
|
||||
uint flags;
|
||||
QDebug operator<<(QDebug dbg);
|
||||
};
|
||||
|
||||
class Q_AUTOTEST_EXPORT QPlaceHolderItem
|
||||
|
|
|
|||
Loading…
Reference in New Issue