diff --git a/applets/appmenu/lib/appmenuapplet.cpp b/applets/appmenu/lib/appmenuapplet.cpp index 0552fbb65..e06e91f74 100644 --- a/applets/appmenu/lib/appmenuapplet.cpp +++ b/applets/appmenu/lib/appmenuapplet.cpp @@ -67,12 +67,12 @@ void AppMenuApplet::init() { } -AppMenuModel *AppMenuApplet::model() const +QAbstractItemModel *AppMenuApplet::model() const { return m_model; } -void AppMenuApplet::setModel(AppMenuModel *model) +void AppMenuApplet::setModel(QAbstractItemModel *model) { if (m_model != model) { m_model = model; @@ -290,3 +290,4 @@ bool AppMenuApplet::eventFilter(QObject *watched, QEvent *event) K_PLUGIN_CLASS_WITH_JSON(AppMenuApplet, "../package/metadata.json") #include "appmenuapplet.moc" +#include "moc_appmenuapplet.cpp" diff --git a/applets/appmenu/lib/appmenuapplet.h b/applets/appmenu/lib/appmenuapplet.h index e39be529f..fc9e8a7ba 100644 --- a/applets/appmenu/lib/appmenuapplet.h +++ b/applets/appmenu/lib/appmenuapplet.h @@ -7,17 +7,18 @@ #pragma once #include + +#include #include class QQuickItem; class QMenu; -class AppMenuModel; class AppMenuApplet : public Plasma::Applet { Q_OBJECT - Q_PROPERTY(AppMenuModel *model READ model WRITE setModel NOTIFY modelChanged) + Q_PROPERTY(QAbstractItemModel *model READ model WRITE setModel NOTIFY modelChanged) Q_PROPERTY(int view READ view WRITE setView NOTIFY viewChanged) @@ -41,8 +42,8 @@ public: QQuickItem *buttonGrid() const; void setButtonGrid(QQuickItem *buttonGrid); - AppMenuModel *model() const; - void setModel(AppMenuModel *model); + QAbstractItemModel *model() const; + void setModel(QAbstractItemModel *model); int view() const; void setView(int type); @@ -69,6 +70,6 @@ private: int m_viewType = FullView; QPointer m_currentMenu; QPointer m_buttonGrid; - QPointer m_model; + QPointer m_model; static int s_refs; };