Commit ff717c0a authored by Frederik Gladhorn's avatar Frederik Gladhorn Committed by Frederik Gladhorn

Do not leak all instances of QMLOutput when QMLScreen is destroyed

Summary:
In practice this is most likely only a leak on exit which does not
matter, but it makes using Valgrind etc impossible.

Reviewers: #plasma, davidedmundson

Reviewed By: #plasma, davidedmundson

Subscribers: romangg, broulik, davidedmundson, plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D14478
parent 749ab17d
......@@ -34,6 +34,12 @@ QMLScreen::QMLScreen(QQuickItem *parent)
connect(this, &QMLScreen::heightChanged, this, &QMLScreen::viewSizeChanged);
}
QMLScreen::~QMLScreen()
{
qDeleteAll(m_outputMap);
m_outputMap.clear();
}
KScreen::ConfigPtr QMLScreen::config() const
{
return m_config;
......
......@@ -57,6 +57,7 @@ class QMLScreen : public QQuickItem
public:
explicit QMLScreen(QQuickItem *parent = nullptr);
~QMLScreen() override;
int connectedOutputsCount() const;
int enabledOutputsCount() 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