forked from quickshell/quickshell
screens: add qDebug<< impl to QuickshellScreenInfo
This commit is contained in:
parent
fc93591cab
commit
15cd78e30c
2 changed files with 25 additions and 0 deletions
|
@ -109,3 +109,21 @@ void QuickshellScreenInfo::screenDestroyed() {
|
|||
this->screen = nullptr;
|
||||
this->dangling = true;
|
||||
}
|
||||
|
||||
QDebug operator<<(QDebug debug, const QuickshellScreenInfo* screen) {
|
||||
if (screen == nullptr) {
|
||||
debug.nospace() << "QuickshellScreenInfo(nullptr)";
|
||||
return debug;
|
||||
}
|
||||
|
||||
debug.nospace() << screen->metaObject()->className() << '(' << static_cast<const void*>(screen)
|
||||
<< ", screen=" << screen->screen << ')';
|
||||
|
||||
return debug;
|
||||
}
|
||||
|
||||
QString QuickshellScreenInfo::toString() const {
|
||||
QString str;
|
||||
QDebug(&str) << this;
|
||||
return str;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue