Get name and refresh rate from output device

Summary:
We can simplify the AbstractWaylandOutput code some more by getting name and
refresh rate of an output from the always available output device object.

Test Plan: Tested with DRM, Wayland nested and virtual backends.

Reviewers: #kwin

Subscribers: davidedmundson, apol, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D23546
icc-effect-5.17.5
Roman Gilg 2019-08-28 22:58:21 +02:00
parent 836f88495b
commit e8fada8a36
1 changed files with 3 additions and 8 deletions

View File

@ -46,10 +46,8 @@ AbstractWaylandOutput::~AbstractWaylandOutput()
QString AbstractWaylandOutput::name() const
{
if (!m_waylandOutput) {
return i18n("unknown");
}
return QStringLiteral("%1 %2").arg(m_waylandOutput->manufacturer()).arg(m_waylandOutput->model());
return QStringLiteral("%1 %2").arg(m_waylandOutputDevice->manufacturer()).arg(
m_waylandOutputDevice->model());
}
QRect AbstractWaylandOutput::geometry() const
@ -64,10 +62,7 @@ QSize AbstractWaylandOutput::physicalSize() const
int AbstractWaylandOutput::refreshRate() const
{
if (!m_waylandOutput) {
return 60000;
}
return m_waylandOutput->refreshRate();
return m_waylandOutputDevice->refreshRate();
}
QPoint AbstractWaylandOutput::globalPos() const