Complete name/pluginName change.

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=781223
This commit is contained in:
Chusslove Illich 2008-03-02 10:44:12 +00:00
parent 0a302e2944
commit 9534c253e8
2 changed files with 6 additions and 7 deletions

View File

@ -197,7 +197,7 @@ QStringList Package::knownPackages(const QString& packageRoot) // static
QString metadata = packageRoot + '/' + sdir + "/metadata.desktop"; QString metadata = packageRoot + '/' + sdir + "/metadata.desktop";
if (QFile::exists(metadata)) { if (QFile::exists(metadata)) {
PackageMetadata m(metadata); PackageMetadata m(metadata);
packages << m.name(); packages << m.pluginName();
} }
} }
@ -247,10 +247,10 @@ bool Package::installPackage(const QString& package,
return false; return false;
} }
PackageMetadata meta(metadataPath); PackageMetadata meta(metadataPath);
QString targetName = meta.name(); QString targetName = meta.pluginName();
if (targetName.isEmpty()) { if (targetName.isEmpty()) {
kWarning(505) << "Package name not specified"; kWarning(505) << "Package plugin name not specified";
return false; return false;
} }

View File

@ -77,7 +77,6 @@ void PackageMetadata::write(const QString &filename, const QString &icon) const
KConfigGroup config = cfg.desktopGroup(); KConfigGroup config = cfg.desktopGroup();
config.writeEntry("Encoding", "UTF-8"); config.writeEntry("Encoding", "UTF-8");
//TODO: this will be a problem for localized names?
config.writeEntry("Name", d->name); config.writeEntry("Name", d->name);
config.writeEntry("Comment", d->description); config.writeEntry("Comment", d->description);
if (!icon.isNull()) { if (!icon.isNull()) {
@ -101,10 +100,10 @@ void PackageMetadata::read(const QString& filename)
KConfig cfg(filename); KConfig cfg(filename);
KConfigGroup config(&cfg, "Desktop Entry"); KConfigGroup config(&cfg, "Desktop Entry");
//TODO: this will be a problem for localized names? d->name = config.readEntry("Name", d->name);
d->name = config.readEntry("X-KDE-PluginInfo-Name", d->name); d->description = config.readEntry("Comment", d->description);
d->description = config.readEntry("Description", d->description);
d->serviceType = config.readEntry("X-KDE-ServiceTypes", d->serviceType); d->serviceType = config.readEntry("X-KDE-ServiceTypes", d->serviceType);
d->pluginName = config.readEntry("X-KDE-PluginInfo-Name", d->pluginName);
d->author = config.readEntry("X-KDE-PluginInfo-Author", d->author); d->author = config.readEntry("X-KDE-PluginInfo-Author", d->author);
d->email = config.readEntry("X-KDE-PluginInfo-Email", d->email); d->email = config.readEntry("X-KDE-PluginInfo-Email", d->email);
d->version = config.readEntry("X-KDE-PluginInfo-Version", d->version); d->version = config.readEntry("X-KDE-PluginInfo-Version", d->version);