summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobert Griebl <robert.griebl@pelagicore.com>2019-01-14 16:30:38 +0100
committerDominik Holland <dominik.holland@pelagicore.com>2019-01-15 08:56:23 +0000
commitd6f4a9e53bace41d8d902ff41112d9b67d290a49 (patch)
tree01c88363dc25c91321534f510309abec39e8ca6f
parentfce1eaec83a1b42c56f2949cb73d42576c479c5a (diff)
Add a runtime warning on non-Linux platforms to both monitoring examples
Non-Linux platforms will not generate all required cpu/memory stats to get useful output and graphs in these examples. Disabling the examples via qmake would have been an option, but would have led to problems with the examples' documentation. Change-Id: Id195187961d10c68e4611517f72ec54d2ecba7b9 Reviewed-by: Dominik Holland <dominik.holland@pelagicore.com>
-rw-r--r--examples/applicationmanager/frame-timer/frame-timer.pro2
-rw-r--r--examples/applicationmanager/frame-timer/system-ui/main.qml23
-rw-r--r--examples/applicationmanager/process-status/process-status.pro15
-rw-r--r--examples/applicationmanager/process-status/system-ui/main.qml24
4 files changed, 64 insertions, 0 deletions
diff --git a/examples/applicationmanager/frame-timer/frame-timer.pro b/examples/applicationmanager/frame-timer/frame-timer.pro
index e35a8a9d..6139216e 100644
--- a/examples/applicationmanager/frame-timer/frame-timer.pro
+++ b/examples/applicationmanager/frame-timer/frame-timer.pro
@@ -4,6 +4,8 @@ CONFIG += am-systemui
OTHER_FILES += \
am-config.yaml \
system-ui/*.qml \
+ doc/images/*.png \
+ doc/src/*.qdoc \
apps/frame-timer.fish/*.yaml \
apps/frame-timer.fish/*.qml \
apps/frame-timer.fish/*.svg \
diff --git a/examples/applicationmanager/frame-timer/system-ui/main.qml b/examples/applicationmanager/frame-timer/system-ui/main.qml
index 0c2ed3fb..1055843d 100644
--- a/examples/applicationmanager/frame-timer/system-ui/main.qml
+++ b/examples/applicationmanager/frame-timer/system-ui/main.qml
@@ -67,6 +67,29 @@ Window {
anchors.fill: parent
color: "linen"
+ // Show a warning on non-Linux platforms
+ Rectangle {
+ visible: Qt.platform.os !== 'linux'
+ anchors {
+ bottom: parent.bottom
+ horizontalCenter: parent.horizontalCenter
+ }
+ width: parent.width / 2
+ height: warningLabel.height
+ z: 1000
+ color: "red"
+ border.color: "white"
+ Text {
+ id: warningLabel
+ width: parent.width
+ color: "white"
+ horizontalAlignment: Text.AlignHCenter
+ wrapMode: Text.Wrap
+ text: "Please note that this example will not show sensible data on your current " +
+ "platform (" + Qt.platform.os + "). Only Linux/multi-process will produce " +
+ "all relevant data points."
+ }
+ }
// A graph displaying the FPS of the System UI itself
Rectangle {
diff --git a/examples/applicationmanager/process-status/process-status.pro b/examples/applicationmanager/process-status/process-status.pro
index e2a794d0..f72ad26c 100644
--- a/examples/applicationmanager/process-status/process-status.pro
+++ b/examples/applicationmanager/process-status/process-status.pro
@@ -1,6 +1,21 @@
TEMPLATE = app
CONFIG += am-systemui
+OTHER_FILES += \
+ am-config.yaml \
+ system-ui/*.qml \
+ doc/images/*.png \
+ doc/src/*.qdoc \
+ apps/process-status.cpu-hog/*.yaml \
+ apps/process-status.cpu-hog/*.qml \
+ apps/process-status.cpu-hog/*.png \
+ apps/process-status.mem-hog/*.yaml \
+ apps/process-status.mem-hog/*.qml \
+ apps/process-status.mem-hog/*.png \
+ apps/process-status.slim/*.yaml \
+ apps/process-status.slim/*.qml \
+ apps/process-status.slim/*.png \
+
target.path = $$[QT_INSTALL_EXAMPLES]/applicationmanager/process-status
INSTALLS += target
diff --git a/examples/applicationmanager/process-status/system-ui/main.qml b/examples/applicationmanager/process-status/system-ui/main.qml
index 4dc54556..b342939e 100644
--- a/examples/applicationmanager/process-status/system-ui/main.qml
+++ b/examples/applicationmanager/process-status/system-ui/main.qml
@@ -48,6 +48,30 @@ Pane {
width: 900
height: appsColumn.y + appsColumn.height
+ // Show a warning on non-Linux platforms
+ Rectangle {
+ visible: Qt.platform.os !== 'linux'
+ anchors {
+ bottom: parent.bottom
+ horizontalCenter: parent.horizontalCenter
+ }
+ width: parent.width / 2
+ height: warningLabel.height
+ z: 1000
+ color: "red"
+ border.color: "white"
+ Text {
+ id: warningLabel
+ width: parent.width
+ color: "white"
+ horizontalAlignment: Text.AlignHCenter
+ wrapMode: Text.Wrap
+ text: "Please note that this example will not show sensible data on your current " +
+ "platform (" + Qt.platform.os + "). Only Linux/multi-process will produce " +
+ "all relevant data points."
+ }
+ }
+
// Show name, icon and ProcessStatus data for each application
Column {
id: appsColumn