create the needed metadata fields to publish with more info

svn path=/trunk/KDE/kdelibs/; revision=1182538
This commit is contained in:
Aaron J. Seigo 2010-10-04 21:10:48 +00:00
parent b4dd15d42e
commit 47a41796cc

View File

@ -1630,13 +1630,18 @@ void Applet::publish(AnnouncementMethods methods, const QString &resourceName)
{
if (d->package) {
d->package->d->publish(methods);
} else {
} else if (d->appletDescription.isValid()) {
if (!d->service) {
d->service = new PlasmoidService(this);
}
kDebug() << "publishing package under name " << resourceName;
d->service->d->publish(methods, resourceName);
PackageMetadata pm;
pm.setName(d->appletDescription.name());
pm.setDescription(d->appletDescription.comment());
d->service->d->publish(methods, resourceName, pm);
} else {
kDebug() << "Can not publish invalid applets.";
}
}