aboutsummaryrefslogtreecommitdiff
path: root/libLumina/LuminaOS-Debian.cpp
diff options
context:
space:
mode:
authorChristopher Roy Bratusek <nano@jpberlin.de>2015-07-11 16:08:15 +0200
committerChristopher Roy Bratusek <nano@jpberlin.de>2015-07-11 16:08:15 +0200
commit9e713e54f18c34943fbbb61e8a8b35be97296cf7 (patch)
tree3f4a6a9013d36ad79ddfb4b4476b60951f5ca42b /libLumina/LuminaOS-Debian.cpp
parentFinal cleanup of debugging messages and temporary changes prior to release. A... (diff)
downloadlumina-9e713e54f18c34943fbbb61e8a8b35be97296cf7.tar.gz
lumina-9e713e54f18c34943fbbb61e8a8b35be97296cf7.tar.bz2
lumina-9e713e54f18c34943fbbb61e8a8b35be97296cf7.zip
update LOS::MemoryUsagePercent() for output format change in latest version of 'top' in Debian
Diffstat (limited to 'libLumina/LuminaOS-Debian.cpp')
-rw-r--r--libLumina/LuminaOS-Debian.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/libLumina/LuminaOS-Debian.cpp b/libLumina/LuminaOS-Debian.cpp
index 12d8f11e..aad0e456 100644
--- a/libLumina/LuminaOS-Debian.cpp
+++ b/libLumina/LuminaOS-Debian.cpp
@@ -266,8 +266,8 @@ int LOS::MemoryUsagePercent(){
if(mem.isEmpty()){ return -1; }
double fB = 0; //Free Bytes
double uB = 0; //Used Bytes
- fB = mem.first().section(" ", 6, 6, QString::SectionSkipEmpty).toDouble();
- uB = mem.first().section(" ", 4, 4, QString::SectionSkipEmpty).toDouble();
+ fB = mem.first().section(" ", 5, 5, QString::SectionSkipEmpty).toDouble();
+ uB = mem.first().section(" ", 7, 7, QString::SectionSkipEmpty).toDouble();
double per = (uB/(fB+uB)) * 100.0;
return qRound(per);
}
bgstack15