diff --git a/components/shellprivate/CMakeLists.txt b/components/shellprivate/CMakeLists.txt index 9e57b5577..6baded8a6 100644 --- a/components/shellprivate/CMakeLists.txt +++ b/components/shellprivate/CMakeLists.txt @@ -33,6 +33,7 @@ target_link_libraries(plasmashellprivateplugin KF5::NewStuff KF5::KIOFileWidgets KF5::WindowSystem + KF5::Declarative ) if (KF5TextEditor_FOUND) diff --git a/components/shellprivate/widgetexplorer/plasmaappletitemmodel.cpp b/components/shellprivate/widgetexplorer/plasmaappletitemmodel.cpp index 17b1162ff..d5c8d3806 100644 --- a/components/shellprivate/widgetexplorer/plasmaappletitemmodel.cpp +++ b/components/shellprivate/widgetexplorer/plasmaappletitemmodel.cpp @@ -29,6 +29,7 @@ #include "config-workspace.h" #include #include +#include PlasmaAppletItem::PlasmaAppletItem(PlasmaAppletItemModel *model, const KPluginInfo& info, @@ -299,6 +300,18 @@ void PlasmaAppletItemModel::populateModel(const QStringList &whatChanged) continue; } + bool inFormFactor = true; + + foreach (const QString &formFactor, KDeclarative::KDeclarative::runtimePlatform()) { + if (!info.formFactors().isEmpty() && + !info.formFactors().contains(formFactor)) { + inFormFactor = false; + } + } + if (!inFormFactor) { + continue; + } + //qDebug() << info.pluginName() << " is the name of the plugin at" << info.entryPath(); //qDebug() << info.name() << info.property("X-Plasma-Thumbnail");