Commit 1f9ed386 authored by Aleix Pol Gonzalez's avatar Aleix Pol Gonzalez 🐧

Expose global actions again

BUG: 388757
parent 535575f3
......@@ -122,7 +122,9 @@ DiscoverPage {
}
Repeater {
model: SourcesModel.actions
model: ActionsModel {
actions: ResourcesModel.actions
}
delegate: RowLayout {
Kirigami.Icon {
......
......@@ -28,6 +28,8 @@
#include "discovercommon_export.h"
#include "AbstractResourcesBackend.h"
class QAction;
class DISCOVERCOMMON_EXPORT AggregatedResultsStream : public ResultsStream
{
Q_OBJECT
......@@ -56,6 +58,7 @@ class DISCOVERCOMMON_EXPORT ResourcesModel : public QObject
Q_PROPERTY(bool isFetching READ isFetching NOTIFY fetchingChanged)
Q_PROPERTY(QVariantList applicationBackends READ applicationBackendsVariant NOTIFY backendsChanged)
Q_PROPERTY(AbstractResourcesBackend* currentApplicationBackend READ currentApplicationBackend WRITE setCurrentApplicationBackend NOTIFY currentApplicationBackendChanged)
Q_PROPERTY(QList<QAction*> actions READ actions CONSTANT)
public:
/** This constructor should be only used by unit tests.
* @p backendName defines what backend will be loaded when the backend is constructed.
......@@ -83,6 +86,8 @@ class DISCOVERCOMMON_EXPORT ResourcesModel : public QObject
void setCurrentApplicationBackend(AbstractResourcesBackend* backend, bool writeConfig = true);
AbstractResourcesBackend* currentApplicationBackend() const;
QList<QAction*> actions() const { return m_ownActions; }
public Q_SLOTS:
void installApplication(AbstractResource* app, const AddonList& addons);
void installApplication(AbstractResource* app);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment