Mimetype -> MimeType
This commit is contained in:
parent
ad58b7e23e
commit
060ad2e80b
@ -411,12 +411,12 @@ bool PackageStructure::isRequired(const char *key) const
|
||||
return it.value().required;
|
||||
}
|
||||
|
||||
void PackageStructure::setDefaultMimetypes(QStringList mimeTypes)
|
||||
void PackageStructure::setDefaultMimeTypes(QStringList mimeTypes)
|
||||
{
|
||||
d->mimeTypes = mimeTypes;
|
||||
}
|
||||
|
||||
void PackageStructure::setMimetypes(const char *key, QStringList mimeTypes)
|
||||
void PackageStructure::setMimeTypes(const char *key, QStringList mimeTypes)
|
||||
{
|
||||
QMap<QByteArray, ContentStructure>::iterator it = d->contents.find(key);
|
||||
if (it == d->contents.end()) {
|
||||
@ -505,7 +505,7 @@ void PackageStructure::read(const KConfigBase *config)
|
||||
addFileDefinition(key, path, name);
|
||||
}
|
||||
|
||||
setMimetypes(key, mimeTypes);
|
||||
setMimeTypes(key, mimeTypes);
|
||||
setRequired(key, required);
|
||||
}
|
||||
}
|
||||
@ -524,7 +524,7 @@ void PackageStructure::write(KConfigBase *config) const
|
||||
group.writeEntry("Path", it.value().paths);
|
||||
group.writeEntry("Name", it.value().name);
|
||||
if (!it.value().mimeTypes.isEmpty()) {
|
||||
group.writeEntry("Mimetypes", it.value().mimeTypes);
|
||||
group.writeEntry("Mimeypes", it.value().mimeTypes);
|
||||
}
|
||||
if (it.value().directory) {
|
||||
group.writeEntry("Directory", true);
|
||||
|
@ -53,12 +53,12 @@ class PackageStructurePrivate;
|
||||
structure.addDirectoryDefinition("images", "pics/", i18n("Images"));
|
||||
QStringList mimeTypes;
|
||||
mimeTypes << "image/svg" << "image/png" << "image/jpeg";
|
||||
structure.setMimetypes("images", mimeTypes);
|
||||
structure.setMimeTypes("images", mimeTypes);
|
||||
|
||||
structure.addDirectoryDefinition("scripts", "code/", i18n("Executable Scripts"));
|
||||
mimeTypes.clear();
|
||||
mimeTypes << "text/\*";
|
||||
structure.setMimetypes("scripts", mimeTypes);
|
||||
structure.setMimeTypes("scripts", mimeTypes);
|
||||
|
||||
structure.addFileDefinition("mainscript", "code/main.js", i18n("Main Script File"));
|
||||
structure.setRequired("mainscript", true);
|
||||
@ -212,7 +212,7 @@ public:
|
||||
*
|
||||
* @param mimeTypes a list of mimeTypes
|
||||
**/
|
||||
void setDefaultMimetypes(QStringList mimeTypes);
|
||||
void setDefaultMimeTypes(QStringList mimeTypes);
|
||||
|
||||
/**
|
||||
* Define mimeTypes for a given part of the structure
|
||||
@ -222,7 +222,7 @@ public:
|
||||
* @param key the entry within the package
|
||||
* @param mimeTypes a list of mimeTypes
|
||||
**/
|
||||
void setMimetypes(const char *key, QStringList mimeTypes);
|
||||
void setMimeTypes(const char *key, QStringList mimeTypes);
|
||||
|
||||
/**
|
||||
* @return the mimeTypes associated with the path, if any
|
||||
|
@ -52,22 +52,22 @@ PlasmoidPackage::PlasmoidPackage(QObject *parent)
|
||||
addDirectoryDefinition("images", "images", i18n("Images"));
|
||||
QStringList mimetypes;
|
||||
mimetypes << "image/svg+xml" << "image/png" << "image/jpeg";
|
||||
setMimetypes("images", mimetypes);
|
||||
setMimeTypes("images", mimetypes);
|
||||
|
||||
addDirectoryDefinition("config", "config", i18n("Configuration Definitions"));
|
||||
mimetypes.clear();
|
||||
mimetypes << "text/xml";
|
||||
setMimetypes("config", mimetypes);
|
||||
setMimeTypes("config", mimetypes);
|
||||
|
||||
addDirectoryDefinition("ui", "ui", i18n("User Interface"));
|
||||
setMimetypes("ui", mimetypes);
|
||||
setMimeTypes("ui", mimetypes);
|
||||
|
||||
addDirectoryDefinition("data", "data", i18n("Data Files"));
|
||||
|
||||
addDirectoryDefinition("scripts", "code", i18n("Executable Scripts"));
|
||||
mimetypes.clear();
|
||||
mimetypes << "text/plain";
|
||||
setMimetypes("scripts", mimetypes);
|
||||
setMimeTypes("scripts", mimetypes);
|
||||
|
||||
addDirectoryDefinition("translations", "locale", i18n("Translations"));
|
||||
|
||||
@ -122,10 +122,10 @@ DataEnginePackage::DataEnginePackage(QObject *parent)
|
||||
addDirectoryDefinition("scripts", "code", i18n("Executable Scripts"));
|
||||
QStringList mimetypes;
|
||||
mimetypes << "text/plain";
|
||||
setMimetypes("scripts", mimetypes);
|
||||
setMimeTypes("scripts", mimetypes);
|
||||
|
||||
addDirectoryDefinition("services", "services/", i18n("Service Descriptions"));
|
||||
setMimetypes("services", mimetypes);
|
||||
setMimeTypes("services", mimetypes);
|
||||
|
||||
addDirectoryDefinition("translations", "locale", i18n("Translations"));
|
||||
|
||||
@ -207,7 +207,7 @@ ThemePackage::ThemePackage(QObject *parent)
|
||||
|
||||
QStringList mimetypes;
|
||||
mimetypes << "image/svg+xml";
|
||||
setDefaultMimetypes(mimetypes);
|
||||
setDefaultMimeTypes(mimetypes);
|
||||
}
|
||||
|
||||
WallpaperPackage::WallpaperPackage(Wallpaper *paper, QObject *parent)
|
||||
@ -219,7 +219,7 @@ WallpaperPackage::WallpaperPackage(Wallpaper *paper, QObject *parent)
|
||||
{
|
||||
QStringList mimetypes;
|
||||
mimetypes << "image/svg" << "image/png" << "image/jpeg" << "image/jpg";
|
||||
setDefaultMimetypes(mimetypes);
|
||||
setDefaultMimeTypes(mimetypes);
|
||||
|
||||
addDirectoryDefinition("images", "images/", i18n("Images"));
|
||||
setRequired("images", true);
|
||||
|
Loading…
Reference in New Issue
Block a user