mirror of
https://bitbucket.org/smil3y/kdelibs.git
synced 2025-02-24 02:42:48 +00:00
kded: crash fix for the case when QT_FOREACH_COMPAT is not defined
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
9cac859359
commit
107dd27063
1 changed files with 9 additions and 6 deletions
|
@ -113,12 +113,15 @@ VFolderMenu::includeItems(QHash<QString,KService::Ptr>& items1, const QHash<QStr
|
||||||
void
|
void
|
||||||
VFolderMenu::matchItems(QHash<QString,KService::Ptr>& items1, const QHash<QString,KService::Ptr>& items2)
|
VFolderMenu::matchItems(QHash<QString,KService::Ptr>& items1, const QHash<QString,KService::Ptr>& items2)
|
||||||
{
|
{
|
||||||
foreach (const KService::Ptr &p, items1)
|
QHash<QString,KService::Ptr>::iterator it = items1.begin();
|
||||||
{
|
while (it != items1.end()) {
|
||||||
QString id = p->menuId();
|
QString id = (*it)->menuId();
|
||||||
if (!items2.contains(id))
|
if (!items2.contains(id)) {
|
||||||
items1.remove(id);
|
it = items1.erase(it);
|
||||||
}
|
} else {
|
||||||
|
it++;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
Loading…
Add table
Reference in a new issue