not hasElementPrefix(prefix) works also when prefix is empty

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=805339
This commit is contained in:
Marco Martin 2008-05-08 09:12:04 +00:00
parent 2a6a5fa6db
commit 48f9257fb1

View File

@ -194,7 +194,11 @@ bool PanelSvg::hasElementPrefix(const QString & prefix) const
{
//for now it simply checks if a center element exists,
//because it could make sense for certain themes to not have all the elements
return hasElement(prefix + "-center");
if (prefix.isEmpty()) {
return hasElement("center");
} else {
return hasElement(prefix + "-center");
}
}
bool PanelSvg::hasElementPrefix(Plasma::Location location) const