Commit 77070354 authored by Friedemann Kleint's avatar Friedemann Kleint Committed by Eike Ziller

QMutableMapIterator uses map in destructor, use foreach.

Change-Id: Ie8737acaea614fdda66cb7642eaed21be41cae64
Reviewed-by: default avatarPeter Kümmel <syntheticpp@gmx.net>
Reviewed-by: default avatarEike Ziller <eike.ziller@nokia.com>
parent b4a2612e
......@@ -111,12 +111,9 @@ SideBar::SideBar(QList<SideBarItem*> itemList,
SideBar::~SideBar()
{
QMutableMapIterator<QString, QWeakPointer<SideBarItem> > iter(d->m_itemMap);
while(iter.hasNext()) {
iter.next();
if (!iter.value().isNull())
delete iter.value().data();
}
foreach (const QWeakPointer<SideBarItem> &i, d->m_itemMap)
if (!i.isNull())
delete i.data();
delete d;
}
......
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