Commit 8f36af23 authored by David Edmundson's avatar David Edmundson
Browse files

Show appropriate error message when applications data is not available

parent b87c5d57
......@@ -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 {
......
Supports Markdown
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