list applets which have an X-KDE-ParentApp= entry in their .desktop file

svn path=/trunk/KDE/kdelibs/; revision=1002131
This commit is contained in:
Aaron J. Seigo 2009-07-25 05:00:27 +00:00
parent 0caae66c3a
commit 51434fc5f1

View File

@ -1750,7 +1750,7 @@ KPluginInfo::List Applet::listAppletInfo(const QString &category,
QString constraint;
if (parentApp.isEmpty()) {
constraint.append("not exist [X-KDE-ParentApp]");
constraint.append("(not exist [X-KDE-ParentApp] or [X-KDE-ParentApp] == '')");
} else {
constraint.append("[X-KDE-ParentApp] == '").append(parentApp).append("'");
}
@ -1821,7 +1821,7 @@ QStringList Applet::listCategories(const QString &parentApp, bool visibleOnly)
QString constraint = "exist [X-KDE-PluginInfo-Category]";
if (parentApp.isEmpty()) {
constraint.append(" and not exist [X-KDE-ParentApp]");
constraint.append("and (not exist [X-KDE-ParentApp] or [X-KDE-ParentApp] == '')");
} else {
constraint.append(" and [X-KDE-ParentApp] == '").append(parentApp).append("'");
}