summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/applets/batteryapplet/batterystatus.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/core/applets/batteryapplet/batterystatus.cpp b/core/applets/batteryapplet/batterystatus.cpp
index 08ddc85..9622726 100644
--- a/core/applets/batteryapplet/batterystatus.cpp
+++ b/core/applets/batteryapplet/batterystatus.cpp
@@ -73,29 +73,27 @@ bool BatteryStatus::getProcApmStatusIpaq() {
73 jackStatus = (*line).mid((*line).find('(')+1, (*line).find(')')-(*line).find('(')-1); 73 jackStatus = (*line).mid((*line).find('(')+1, (*line).find(')')-(*line).find('(')-1);
74 } else { 74 } else {
75 ipaqStatus = (*line).mid((*line).find('(')+1, (*line).find(')')-(*line).find('(')-1); 75 ipaqStatus = (*line).mid((*line).find('(')+1, (*line).find(')')-(*line).find('(')-1);
76 } 76 }
77 } else if( (*line).startsWith(" Chemistry") ) { 77 } else if( (*line).startsWith(" Chemistry") ) {
78 if (bat2 == true) { 78 if (bat2 == true) {
79 jackChem = (*line).mid((*line).find('('), (*line).find(')')-(*line).find('(')+1); 79 jackChem = (*line).mid((*line).find('('), (*line).find(')')-(*line).find('(')+1);
80 } else { 80 } else {
81 ipaqChem = (*line).mid((*line).find('('), (*line).find(')')-(*line).find('(')+1); 81 ipaqChem = (*line).mid((*line).find('('), (*line).find(')')-(*line).find('(')+1);
82 } 82 }
83 } 83 }
84 } 84 }
85 } else { 85 procApmIpaq.close();
86 QMessageBox::warning(this, tr("Failure"),tr("could not open file"));
87 } 86 }
88 87
89 procApmIpaq.close();
90 jackPercent = perc2.toInt(); 88 jackPercent = perc2.toInt();
91 ipaqPercent = perc1.toInt(); 89 ipaqPercent = perc1.toInt();
92 90
93 if (perc2.isEmpty() || perc2 == "unknow" ) { 91 if (perc2.isEmpty() || perc2 == "unknow" ) {
94 perc2 = tr("no data"); 92 perc2 = tr("no data");
95 } else { 93 } else {
96 perc2 += " %"; 94 perc2 += " %";
97 } 95 }
98 96
99 if (sec2 == "0" || sec2 == "" || sec2.isEmpty()) { 97 if (sec2 == "0" || sec2 == "" || sec2.isEmpty()) {
100 sec2 = tr("no data"); 98 sec2 = tr("no data");
101 } else { 99 } else {