backport fix for widgets with X-KDE-ParentApp= in their metatdata.desktop

svn path=/branches/KDE/4.3/kdelibs/; revision=1002136
This commit is contained in:
Aaron J. Seigo 2009-07-25 05:43:20 +00:00
parent e02f8c071d
commit 2ac54f8f19

View File

@ -1739,7 +1739,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("'");
}
@ -1810,7 +1810,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("'");
}