x11: Pass the output name to X11Output constructor
The output name is static, i.e. it cannot change, so there's no point for having a setter.
This commit is contained in:
parent
a8810e0c33
commit
bd6d04b417
3 changed files with 4 additions and 11 deletions
|
@ -12,8 +12,9 @@
|
|||
namespace KWin
|
||||
{
|
||||
|
||||
X11Output::X11Output(QObject *parent)
|
||||
X11Output::X11Output(const QString &name, QObject *parent)
|
||||
: AbstractOutput(parent)
|
||||
, m_name(name)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -22,11 +23,6 @@ QString X11Output::name() const
|
|||
return m_name;
|
||||
}
|
||||
|
||||
void X11Output::setName(QString set)
|
||||
{
|
||||
m_name = set;
|
||||
}
|
||||
|
||||
QRect X11Output::geometry() const
|
||||
{
|
||||
if (m_geometry.isValid()) {
|
||||
|
|
|
@ -28,11 +28,9 @@ class KWIN_EXPORT X11Output : public AbstractOutput
|
|||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit X11Output(QObject *parent = nullptr);
|
||||
~X11Output() override = default;
|
||||
explicit X11Output(const QString &name, QObject *parent = nullptr);
|
||||
|
||||
QString name() const override;
|
||||
void setName(QString set);
|
||||
|
||||
QRect geometry() const override;
|
||||
void setGeometry(QRect set);
|
||||
|
|
|
@ -520,8 +520,7 @@ void X11StandalonePlatform::doUpdateOutputs()
|
|||
changed.append(output);
|
||||
removed.removeOne(output);
|
||||
} else {
|
||||
output = new X11Output();
|
||||
output->setName(outputInfo.name());
|
||||
output = new X11Output(outputInfo.name());
|
||||
added.append(output);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue