platforms/drm: fix crashing debug operator
This commit is contained in:
parent
26dff99f78
commit
566223b190
2 changed files with 9 additions and 3 deletions
|
@ -339,7 +339,13 @@ void DrmObject::Property::initEnumMap(drmModePropertyRes *prop)
|
|||
|
||||
}
|
||||
|
||||
QDebug& operator<<(QDebug& s, const KWin::DrmObject *obj)
|
||||
QDebug operator<<(QDebug s, const KWin::DrmObject *obj)
|
||||
{
|
||||
return s.nospace() << "DrmObject(" << obj->id() << ", gpu: "<< obj->gpu() << ')';
|
||||
QDebugStateSaver saver(s);
|
||||
if (obj) {
|
||||
s.nospace() << "DrmObject(id=" << obj->id() << ", gpu="<< obj->gpu() << ')';
|
||||
} else {
|
||||
s << "DrmObject(0x0)";
|
||||
}
|
||||
return s;
|
||||
}
|
||||
|
|
|
@ -211,4 +211,4 @@ private:
|
|||
|
||||
}
|
||||
|
||||
QDebug& operator<<(QDebug& stream, const KWin::DrmObject*);
|
||||
QDebug operator<<(QDebug stream, const KWin::DrmObject*);
|
||||
|
|
Loading…
Reference in a new issue