debugging: Simplify printing DrmObjects through QDebug
Summary: Print automatically a few properties as well as the type, so it's easier to read debug information. Test Plan: Debugged a fix with it Reviewers: #kwin, davidedmundson Reviewed By: #kwin, davidedmundson Subscribers: kwin Tags: #kwin Differential Revision: https://phabricator.kde.org/D28641
This commit is contained in:
parent
2a39a7a7e1
commit
f6029c3dbd
2 changed files with 6 additions and 0 deletions
|
@ -184,3 +184,8 @@ void DrmObject::Property::initEnumMap(drmModePropertyRes *prop)
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
QDebug& operator<<(QDebug& s, const KWin::DrmObject* obj)
|
||||
{
|
||||
return s.nospace() << "DrmObject(" << obj->id() << ", output:" << obj->output() << ", fd: "<< obj->fd() << ')';
|
||||
}
|
||||
|
|
|
@ -149,3 +149,4 @@ private:
|
|||
|
||||
}
|
||||
|
||||
QDebug& operator<<(QDebug& stream, const KWin::DrmObject*);
|
||||
|
|
Loading…
Reference in a new issue