Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Plasma
Plasma System Monitor
Commits
8f36af23
Commit
8f36af23
authored
Mar 08, 2021
by
David Edmundson
Browse files
Show appropriate error message when applications data is not available
parent
b87c5d57
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/faces/applicationstable/contents/ui/ApplicationsTableView.qml
View file @
8f36af23
...
...
@@ -9,6 +9,7 @@ import QtQuick.Controls 2.12
import
Qt
.
labs
.
qmlmodels
1.0
import
org
.
kde
.
kirigami
2.12
as
Kirigami
import
org
.
kde
.
kitemmodels
1.0
as
KItemModels
import
org
.
kde
.
quickcharts
1.0
as
Charts
...
...
@@ -19,6 +20,14 @@ import org.kde.ksysguard.table 1.0 as Table
Table.BaseTableView
{
id
:
view
Kirigami.PlaceholderMessage
{
visible
:
!
appModel
.
available
anchors.fill
:
parent
anchors.margins
:
Kirigami
.
Units
.
largeSpacing
icon.name
:
"
action-unavailable-symbolic
"
text
:
i18nc
(
"
Warning message shown on runtime error
"
,
"
Applications view is unsupported on your system
"
);
}
property
var
enabledColumns
:
[]
property
alias
columnDisplay
:
displayModel
.
columnDisplay
property
alias
sourceModel
:
appModel
...
...
@@ -155,6 +164,12 @@ Table.BaseTableView {
hiddenAttributes
=
hidden
return
result
;
}
Component.onCompleted
:
{
if
(
!
available
)
{
console
.
error
(
"
Implementation matching https://systemd.io/DESKTOP_ENVIRONMENTS/ was not found. ApplicationsView will not be available
"
)
}
}
}
delegate
:
DelegateChooser
{
...
...
Write
Preview
Supports
Markdown
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