From kde-commits Wed May 27 18:34:24 2009 From: =?utf-8?q?Aaron=20J=2E=20Seigo?= Date: Wed, 27 May 2009 18:34:24 +0000 To: kde-commits Subject: KDE/kdebase/workspace/plasma/applets/kickoff/core Message-Id: <1243449264.610759.13816.nullmailer () svn ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=124344929513962 SVN commit 973720 by aseigo: check for exec() dupes first BUG:194306 M +7 -7 searchmodel.cpp --- trunk/KDE/kdebase/workspace/plasma/applets/kickoff/core/searchmodel.cpp #973719:973720 @@ -166,18 +166,18 @@ int existingPos = desktopNames.value(service->name(), -1); KService::Ptr existing = existingPos < 0 ? KService::Ptr(0) : results[existingPos]; - if (existing.isNull()) { + if (execFields.contains(service->exec()) || service->noDisplay()) { + // do not show more than one entry which does the same thing when run + // (ie. ignore entries that have an identical 'Exec' field to an existing + // entry) + results[i] = 0; + } else if (existing.isNull()) { desktopNames.insert(service->name(), i); execFields.insert(service->exec()); } else if (isLaterVersion(existing, service)) { - results[i] = 0; + results[i] = 0; } else if (isLaterVersion(service, existing)) { results[existingPos] = 0; - } else if (execFields.contains(service->exec()) && service->noDisplay()) { - // do not show more than one entry which does the same thing when run - // (ie. ignore entries that have an identical 'Exec' field to an existing - // entry) - results[i] = 0; } }