mirror of
https://invent.kde.org/system/dolphin
synced 2024-08-22 01:40:02 +00:00
Merge branch 'Applications/16.08'
This commit is contained in:
commit
5d684bea8b
|
@ -48,6 +48,7 @@
|
|||
#include <QKeyEvent>
|
||||
#include <QMenuBar>
|
||||
#include <QMenu>
|
||||
#include <QMimeDatabase>
|
||||
|
||||
#include <panels/places/placesitem.h>
|
||||
#include <panels/places/placesitemmodel.h>
|
||||
|
@ -519,8 +520,19 @@ void DolphinContextMenu::addFileItemPluginActions()
|
|||
}
|
||||
}
|
||||
|
||||
const auto jsonPlugins = KPluginLoader::findPlugins(QStringLiteral("kf5/kfileitemaction"), [](const KPluginMetaData& metaData) {
|
||||
return metaData.serviceTypes().contains(QStringLiteral("KFileItemAction/Plugin"));
|
||||
const auto jsonPlugins = KPluginLoader::findPlugins(QStringLiteral("kf5/kfileitemaction"), [=](const KPluginMetaData& metaData) {
|
||||
if (!metaData.serviceTypes().contains(QStringLiteral("KFileItemAction/Plugin"))) {
|
||||
return false;
|
||||
}
|
||||
|
||||
auto mimeType = QMimeDatabase().mimeTypeForName(commonMimeType);
|
||||
foreach (const auto& supportedMimeType, metaData.mimeTypes()) {
|
||||
if (mimeType.inherits(supportedMimeType)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
});
|
||||
|
||||
foreach (const auto& jsonMetadata, jsonPlugins) {
|
||||
|
|
Loading…
Reference in a new issue