From 29503066dd15e3362fab1842aa8898ae32a36925 Mon Sep 17 00:00:00 2001 From: "Aaron J. Seigo" Date: Tue, 4 May 2010 03:19:09 +0000 Subject: [PATCH] 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 --- applet.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/applet.cpp b/applet.cpp index 5ce2ee55b..ae9bff595 100644 --- a/applet.cpp +++ b/applet.cpp @@ -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('/'); }