Riddell's commit to fix broken installations (and i think it's still something of a bad hack, tbh) broke ALL OTHER WIDGET TYPES. fail.

this fixes that.
BUG:236258

svn path=/trunk/KDE/kdelibs/; revision=1122503
This commit is contained in:
Aaron J. Seigo 2010-05-04 03:19:09 +00:00
parent c529b14bab
commit 29503066dd

View File

@ -2642,9 +2642,13 @@ void AppletPrivate::init(const QString &packagePath)
// find where the Package is
QString path = packagePath;
if (path.isEmpty()) {
path = q->packageStructure()->defaultPackageRoot() + '/' + appletDescription.pluginName() + "/metadata.desktop";
path = KStandardDirs::locate("data", path);
path.replace(QString("/metadata.desktop"),QString("/"));
QString subPath = q->packageStructure()->defaultPackageRoot() + '/' + appletDescription.pluginName() + '/';
path = KStandardDirs::locate("data", subPath + "metadata.desktop");
if (path.isEmpty()) {
path = KStandardDirs::locate("data", subPath);
} else {
path.remove(QString("metadata.desktop"));
}
} else if (!path.endsWith('/')) {
path.append('/');
}