diff --git a/src/shell/CMakeLists.txt b/src/shell/CMakeLists.txt index 4b722024f..be346eb7e 100644 --- a/src/shell/CMakeLists.txt +++ b/src/shell/CMakeLists.txt @@ -46,6 +46,11 @@ set(scripting_SRC scripting/widget.cpp ) +set(widgetexplorer_SRC + widgetexplorer/kcategorizeditemsviewmodels.cpp + widgetexplorer/plasmaappletitemmodel.cpp +) + add_executable(testplasma2 main.cpp desktopcorona.cpp @@ -55,6 +60,7 @@ add_executable(testplasma2 view.cpp panelconfigview.cpp ${scripting_SRC} + ${widgetexplorer_SRC} ) # The Qt5Widgets_LIBRARIES variable also includes QtGui and QtCore diff --git a/src/shell/widgetexplorer/kcategorizeditemsviewmodels.cpp b/src/shell/widgetexplorer/kcategorizeditemsviewmodels.cpp index 500e6ff67..cf1e226aa 100644 --- a/src/shell/widgetexplorer/kcategorizeditemsviewmodels.cpp +++ b/src/shell/widgetexplorer/kcategorizeditemsviewmodels.cpp @@ -18,6 +18,7 @@ */ #include "kcategorizeditemsviewmodels_p.h" +#include #include #define COLUMN_COUNT 4 diff --git a/src/shell/widgetexplorer/plasmaappletitemmodel.cpp b/src/shell/widgetexplorer/plasmaappletitemmodel.cpp index cb1b9887b..e44bc064c 100644 --- a/src/shell/widgetexplorer/plasmaappletitemmodel.cpp +++ b/src/shell/widgetexplorer/plasmaappletitemmodel.cpp @@ -19,7 +19,9 @@ #include "plasmaappletitemmodel_p.h" +#include #include +#include #include PlasmaAppletItem::PlasmaAppletItem(PlasmaAppletItemModel *model, @@ -50,7 +52,7 @@ PlasmaAppletItem::PlasmaAppletItem(PlasmaAppletItemModel *model, setData(info.pluginName(), PlasmaAppletItemModel::PluginNameRole); setData(info.comment(), PlasmaAppletItemModel::DescriptionRole); setData(info.category().toLower(), PlasmaAppletItemModel::CategoryRole); - setData(info.fullLicense().name(KAboutData::FullName), PlasmaAppletItemModel::LicenseRole); + //setData(info.fullLicense().name(KAboutData::FullName), PlasmaAppletItemModel::LicenseRole); // FIXME setData(info.website(), PlasmaAppletItemModel::WebsiteRole); setData(info.version(), PlasmaAppletItemModel::VersionRole); setData(info.author(), PlasmaAppletItemModel::AuthorRole); @@ -221,7 +223,10 @@ void PlasmaAppletItemModel::populateModel(const QStringList &whatChanged) //kDebug() << "number of applets is" // << Plasma::Applet::listAppletInfo(QString(), m_application).count(); - foreach (const KPluginInfo &info, Plasma::Applet::listAppletInfo(QString(), m_application)) { + KService::List services = KServiceTypeTrader::self()->query("Plasma/Applet", QString()); + + foreach (const KSharedPtr service, services) { + KPluginInfo info(service); //kDebug() << info.pluginName() << "NoDisplay" << info.property("NoDisplay").toBool(); if (info.property("NoDisplay").toBool() || info.category() == i18n("Containments")) { // we don't want to show the hidden category