Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Plasma
KWin
Commits
220a1e04
Commit
220a1e04
authored
Feb 23, 2021
by
Vlad Zahorodnii
Browse files
Add QDebug stream operator for AbstractOutput
This can be useful for debugging purposes.
parent
33ba2974
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/abstract_output.cpp
View file @
220a1e04
...
...
@@ -53,6 +53,27 @@ const uint16_t *GammaRamp::blue() const
return
m_table
.
data
()
+
2
*
m_size
;
}
QDebug
operator
<<
(
QDebug
debug
,
const
AbstractOutput
*
output
)
{
QDebugStateSaver
saver
(
debug
);
debug
.
nospace
();
if
(
output
)
{
debug
<<
output
->
metaObject
()
->
className
()
<<
'('
<<
static_cast
<
const
void
*>
(
output
);
debug
<<
", name="
<<
output
->
name
();
debug
<<
", geometry="
<<
output
->
geometry
();
debug
<<
", scale="
<<
output
->
scale
();
if
(
debug
.
verbosity
()
>
2
)
{
debug
<<
", manufacturer="
<<
output
->
manufacturer
();
debug
<<
", model="
<<
output
->
model
();
debug
<<
", serialNumber="
<<
output
->
serialNumber
();
}
debug
<<
')'
;
}
else
{
debug
<<
"AbstractOutput(0x0)"
;
}
return
debug
;
}
AbstractOutput
::
AbstractOutput
(
QObject
*
parent
)
:
QObject
(
parent
)
{
...
...
src/abstract_output.h
View file @
220a1e04
...
...
@@ -11,6 +11,7 @@
#include <kwin_export.h>
#include <QDebug>
#include <QObject>
#include <QRect>
#include <QSize>
...
...
@@ -210,6 +211,8 @@ private:
int
m_directScanoutCount
=
0
;
};
KWIN_EXPORT
QDebug
operator
<<
(
QDebug
debug
,
const
AbstractOutput
*
output
);
}
// namespace KWin
#endif
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment