diff --git a/components/shellprivate/widgetexplorer/plasmaappletitemmodel.cpp b/components/shellprivate/widgetexplorer/plasmaappletitemmodel.cpp --- a/components/shellprivate/widgetexplorer/plasmaappletitemmodel.cpp +++ b/components/shellprivate/widgetexplorer/plasmaappletitemmodel.cpp @@ -31,10 +31,8 @@ #include #include -PlasmaAppletItem::PlasmaAppletItem(PlasmaAppletItemModel *model, - const KPluginInfo& info) - : QObject(model), - m_model(model), +PlasmaAppletItem::PlasmaAppletItem(const KPluginInfo& info): + AbstractItem(), m_info(info), m_runningCount(0), m_local(false) @@ -179,11 +177,6 @@ return types; } -PlasmaAppletItemModel* PlasmaAppletItem::appletItemModel() -{ - return m_model; -} - QVariant PlasmaAppletItem::data(int role) const { switch (role) { @@ -305,7 +298,7 @@ //qDebug() << info.pluginName() << " is the name of the plugin at" << info.entryPath(); //qDebug() << info.name() << info.property("X-Plasma-Thumbnail"); - appendRow(new PlasmaAppletItem(this, info)); + appendRow(new PlasmaAppletItem(info)); } emit modelPopulated(); diff --git a/components/shellprivate/widgetexplorer/plasmaappletitemmodel_p.h b/components/shellprivate/widgetexplorer/plasmaappletitemmodel_p.h --- a/components/shellprivate/widgetexplorer/plasmaappletitemmodel_p.h +++ b/components/shellprivate/widgetexplorer/plasmaappletitemmodel_p.h @@ -29,12 +29,10 @@ /** * Implementation of the KCategorizedItemsViewModels::AbstractItem */ -class PlasmaAppletItem : public QObject, public KCategorizedItemsViewModels::AbstractItem +class PlasmaAppletItem : public KCategorizedItemsViewModels::AbstractItem { - Q_OBJECT - public: - PlasmaAppletItem(PlasmaAppletItemModel *model, const KPluginInfo& info); + PlasmaAppletItem(const KPluginInfo& info); QString pluginName() const; QString name() const override; @@ -49,7 +47,6 @@ int running() const override; bool isLocal() const; - PlasmaAppletItemModel* appletItemModel(); bool matches(const QString &pattern) const override; //set how many instances of this applet are running @@ -59,7 +56,6 @@ QStringList mimeTypes() const; private: - PlasmaAppletItemModel * m_model; KPluginInfo m_info; QString m_screenshot; QString m_icon;