Use qDeleteAll in destructor of Scene class

Summary:
qDeleteAll can be used to delete values in QMap or QHash. Please notice
that qDeleteAll calls `delete` only for values, not keys.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D13822
This commit is contained in:
Vlad Zagorodniy 2018-07-01 12:26:50 +03:00
parent d82aded4a6
commit e0088b9c9d

View file

@ -100,9 +100,7 @@ Scene::Scene(QObject *parent)
Scene::~Scene()
{
foreach (Window *w, m_windows) {
delete w;
}
qDeleteAll(m_windows);
}
// returns mask and possibly modified region