proper capitalization of MimeType
This commit is contained in:
parent
48a6a99b10
commit
9b31c61d29
@ -2192,11 +2192,11 @@ KPluginInfo::List Applet::listAppletInfo(const QString &category, const QString
|
|||||||
return PluginLoader::pluginLoader()->listAppletInfo(category, parentApp);
|
return PluginLoader::pluginLoader()->listAppletInfo(category, parentApp);
|
||||||
}
|
}
|
||||||
|
|
||||||
KPluginInfo::List Applet::listAppletInfoForMimetype(const QString &mimetype)
|
KPluginInfo::List Applet::listAppletInfoForMimeType(const QString &mimeType)
|
||||||
{
|
{
|
||||||
QString constraint = AppletPrivate::parentAppConstraint();
|
QString constraint = AppletPrivate::parentAppConstraint();
|
||||||
constraint.append(QString(" and '%1' in [X-Plasma-DropMimeTypes]").arg(mimetype));
|
constraint.append(QString(" and '%1' in [X-Plasma-DropMimeTypes]").arg(mimeType));
|
||||||
//kDebug() << "listAppletInfoForMimetype with" << mimetype << constraint;
|
//kDebug() << "listAppletInfoForMimetype with" << mimeType << constraint;
|
||||||
KService::List offers = KServiceTypeTrader::self()->query("Plasma/Applet", constraint);
|
KService::List offers = KServiceTypeTrader::self()->query("Plasma/Applet", constraint);
|
||||||
AppletPrivate::filterOffers(offers);
|
AppletPrivate::filterOffers(offers);
|
||||||
return KPluginInfo::fromServices(offers);
|
return KPluginInfo::fromServices(offers);
|
||||||
|
2
applet.h
2
applet.h
@ -307,7 +307,7 @@ class PLASMA_EXPORT Applet : public QGraphicsWidget
|
|||||||
*
|
*
|
||||||
* @return list of applets
|
* @return list of applets
|
||||||
**/
|
**/
|
||||||
static KPluginInfo::List listAppletInfoForMimetype(const QString &mimetype);
|
static KPluginInfo::List listAppletInfoForMimeType(const QString &mimetype);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a list of all known applets associated with a certain URL.
|
* Returns a list of all known applets associated with a certain URL.
|
||||||
|
@ -1168,7 +1168,7 @@ void Containment::dragEnterEvent(QGraphicsSceneDragDropEvent *event)
|
|||||||
QStringList formats = event->mimeData()->formats();
|
QStringList formats = event->mimeData()->formats();
|
||||||
|
|
||||||
foreach (const QString &format, formats) {
|
foreach (const QString &format, formats) {
|
||||||
KPluginInfo::List appletList = Applet::listAppletInfoForMimetype(format);
|
KPluginInfo::List appletList = Applet::listAppletInfoForMimeType(format);
|
||||||
if (!appletList.isEmpty()) {
|
if (!appletList.isEmpty()) {
|
||||||
event->setAccepted(true);
|
event->setAccepted(true);
|
||||||
break;
|
break;
|
||||||
@ -1370,7 +1370,7 @@ void ContainmentPrivate::dropData(QPointF scenePos, QPoint screenPos, QGraphicsS
|
|||||||
QHash<QString, QString> pluginFormats;
|
QHash<QString, QString> pluginFormats;
|
||||||
|
|
||||||
foreach (const QString &format, formats) {
|
foreach (const QString &format, formats) {
|
||||||
KPluginInfo::List plugins = Applet::listAppletInfoForMimetype(format);
|
KPluginInfo::List plugins = Applet::listAppletInfoForMimeType(format);
|
||||||
|
|
||||||
foreach (const KPluginInfo &plugin, plugins) {
|
foreach (const KPluginInfo &plugin, plugins) {
|
||||||
if (seenPlugins.contains(plugin.pluginName())) {
|
if (seenPlugins.contains(plugin.pluginName())) {
|
||||||
@ -1527,7 +1527,7 @@ void ContainmentPrivate::mimeTypeRetrieved(KIO::Job *job, const QString &mimetyp
|
|||||||
|
|
||||||
kDebug() << "Creating menu for:" << mimetype << posi << args;
|
kDebug() << "Creating menu for:" << mimetype << posi << args;
|
||||||
|
|
||||||
appletList << Applet::listAppletInfoForMimetype(mimetype);
|
appletList << Applet::listAppletInfoForMimeType(mimetype);
|
||||||
KPluginInfo::List wallpaperList;
|
KPluginInfo::List wallpaperList;
|
||||||
if (drawWallpaper) {
|
if (drawWallpaper) {
|
||||||
if (wallpaper && wallpaper->supportsMimetype(mimetype)) {
|
if (wallpaper && wallpaper->supportsMimetype(mimetype)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user