diff --git a/containments/desktop/plugins/folder/menuhelper.h b/containments/desktop/plugins/folder/menuhelper.h --- a/containments/desktop/plugins/folder/menuhelper.h +++ b/containments/desktop/plugins/folder/menuhelper.h @@ -32,7 +32,7 @@ explicit MenuHelper(QObject *parent = nullptr); ~MenuHelper(); - Q_INVOKABLE QString iconName(QAction *action); + Q_INVOKABLE QString iconName(QAction *action) const; Q_INVOKABLE void setMenu(QAction *action, QObject *menu); }; diff --git a/containments/desktop/plugins/folder/menuhelper.cpp b/containments/desktop/plugins/folder/menuhelper.cpp --- a/containments/desktop/plugins/folder/menuhelper.cpp +++ b/containments/desktop/plugins/folder/menuhelper.cpp @@ -30,7 +30,7 @@ { } -QString MenuHelper::iconName(QAction *action) +QString MenuHelper::iconName(QAction *action) const { if (!action) { return QString(); diff --git a/containments/desktop/plugins/folder/placesmodel.h b/containments/desktop/plugins/folder/placesmodel.h --- a/containments/desktop/plugins/folder/placesmodel.h +++ b/containments/desktop/plugins/folder/placesmodel.h @@ -34,7 +34,7 @@ explicit PlacesModel(QObject *parent = nullptr); ~PlacesModel(); - bool activityLinkingEnabled(); + bool activityLinkingEnabled() const; QHash roleNames() const override; Q_INVOKABLE QString urlForIndex(int idx) const; diff --git a/containments/desktop/plugins/folder/placesmodel.cpp b/containments/desktop/plugins/folder/placesmodel.cpp --- a/containments/desktop/plugins/folder/placesmodel.cpp +++ b/containments/desktop/plugins/folder/placesmodel.cpp @@ -47,7 +47,7 @@ return roleNames; } -bool PlacesModel::activityLinkingEnabled() +bool PlacesModel::activityLinkingEnabled() const { const KService::List services = KServiceTypeTrader::self()->query(QStringLiteral("KFileItemAction/Plugin"), QStringLiteral("Library == 'kactivitymanagerd_fileitem_linking_plugin'")); diff --git a/containments/desktop/plugins/folder/rubberband.h b/containments/desktop/plugins/folder/rubberband.h --- a/containments/desktop/plugins/folder/rubberband.h +++ b/containments/desktop/plugins/folder/rubberband.h @@ -32,7 +32,7 @@ void paint(QPainter* painter) override; - Q_INVOKABLE bool intersects(const QRectF &rect); + Q_INVOKABLE bool intersects(const QRectF &rect) const; protected: void geometryChanged(const QRectF &newGeometry, const QRectF &oldGeometry) override; diff --git a/containments/desktop/plugins/folder/rubberband.cpp b/containments/desktop/plugins/folder/rubberband.cpp --- a/containments/desktop/plugins/folder/rubberband.cpp +++ b/containments/desktop/plugins/folder/rubberband.cpp @@ -48,7 +48,7 @@ qApp->style()->drawControl(QStyle::CE_RubberBand, &opt, painter); } -bool RubberBand::intersects(const QRectF &rect) +bool RubberBand::intersects(const QRectF &rect) const { return m_geometry.intersects(rect); }