Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Discover
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Plasma
Discover
Commits
1f9ed386
Commit
1f9ed386
authored
Jan 10, 2018
by
Aleix Pol Gonzalez
🐧
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Expose global actions again
BUG: 388757
parent
535575f3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
1 deletion
+8
-1
discover/qml/SourcesPage.qml
discover/qml/SourcesPage.qml
+3
-1
libdiscover/resources/ResourcesModel.h
libdiscover/resources/ResourcesModel.h
+5
-0
No files found.
discover/qml/SourcesPage.qml
View file @
1f9ed386
...
...
@@ -122,7 +122,9 @@ DiscoverPage {
}
Repeater
{
model
:
SourcesModel
.
actions
model
:
ActionsModel
{
actions
:
ResourcesModel
.
actions
}
delegate
:
RowLayout
{
Kirigami.Icon
{
...
...
libdiscover/resources/ResourcesModel.h
View file @
1f9ed386
...
...
@@ -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
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment