Members of the KDE Community are recommended to subscribe to the kde-community mailing list at to allow them to participate in important discussions and receive other important announcements

Commit e6b197b4 authored by Frederik Gladhorn's avatar Frederik Gladhorn

Define ownership of edid in output and do not leak it

Summary: Valgrind showed that in some cases we were leaking the edid in tests.

Test Plan: valgrind --leak-check=full bin/testkwaylandbackend

Reviewers: #plasma, mart

Reviewed By: #plasma, mart

Subscribers: plasma-devel

Tags: #plasma

Differential Revision:
parent 4be57b20
......@@ -93,7 +93,7 @@ class Q_DECL_HIDDEN Output::Private
bool primary;
bool followPreferredMode = false;
mutable QScopedPointer<Edid> edid;
QScopedPointer<Edid> edid;
bool Output::Private::compareModeList(const ModeList& before, const ModeList &after)
......@@ -181,6 +181,13 @@ class KSCREEN_EXPORT Output : public QObject
void setClones(QList<int> outputlist);
void setEdid(const QByteArray &rawData);
* edid returns the output's EDID information if available.
* The output maintains ownership of the returned Edid, so the caller should not delete it.
* Note that the edid is only valid as long as the output is alive.
Edid* edid() const;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment