Fix crash in the shell test
Give the item a parent, otherwise the qml engine decides to adopt it and
when we do the deleteLater on them, they have been already deleted.
Since we are the parents, we don't need to call the deleteLAter eiether
they'll be properly deleted on our deletion.
Approved by PS Jenkins bot, Michael Zanetti, Michał Sawicz.
commit8c1f6913148d9646999b38c5f89fdceee3dd3668
authorAlbert Astals <albert.astals@canonical.com>
dateWed 14 Aug 2013, 23:00 (13 years ago)
parent252a1a3cc8113d
tests/mocks/Unity/Launcher/MockLauncherModel.cpp−4
@@ -46,10 +46,6 @@ MockLauncherModel::MockLauncherModel(QObject* parent): LauncherModelInterface(pa
4646
4747MockLauncherModel::~MockLauncherModel()
4848{
49− while (!m_list.empty())
50− {
51− m_list.takeFirst()->deleteLater();
52− }
5349}
5450
5551int MockLauncherModel::rowCount(const QModelIndex& parent) const