summaryrefslogtreecommitdiff
authorkergoth <kergoth>2003-03-23 23:00:35 (UTC)
committer kergoth <kergoth>2003-03-23 23:00:35 (UTC)
commit7849f269eb4bbabe807608cec26d1a0ee9d05868 (patch) (unidiff)
tree887e4dd018e2fa92e03016d7d73c023f0371a7d9
parentaff270316219558bd00cbcc3ffc275213080fcd3 (diff)
downloadopie-7849f269eb4bbabe807608cec26d1a0ee9d05868.zip
opie-7849f269eb4bbabe807608cec26d1a0ee9d05868.tar.gz
opie-7849f269eb4bbabe807608cec26d1a0ee9d05868.tar.bz2
Use of bat2 bool uninitialized (when on zaurus) resulted
in display of "Charging both devices" which confused users. @@ -15,7 +15,7 @@ using namespace Opie; BatteryStatus::BatteryStatus( const PowerStatus *p, QWidget *parent ) - : QWidget( parent, 0, WDestructiveClose), ps(p) { + : QWidget( parent, 0, WDestructiveClose), ps(p), bat2(false) { setCaption( tr("Battery status") ); QPushButton *pb = new QPushButton( tr("Close"), this ); pb->move( 70, 250 );
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/applets/batteryapplet/batterystatus.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/applets/batteryapplet/batterystatus.cpp b/core/applets/batteryapplet/batterystatus.cpp
index 28d6275..7d3bdd9 100644
--- a/core/applets/batteryapplet/batterystatus.cpp
+++ b/core/applets/batteryapplet/batterystatus.cpp
@@ -6,25 +6,25 @@
6#include <opie/odevice.h> 6#include <opie/odevice.h>
7 7
8#include <qpainter.h> 8#include <qpainter.h>
9#include <qpushbutton.h> 9#include <qpushbutton.h>
10#include <qdrawutil.h> 10#include <qdrawutil.h>
11#include <qfile.h> 11#include <qfile.h>
12#include <qtextstream.h> 12#include <qtextstream.h>
13#include <qmessagebox.h> 13#include <qmessagebox.h>
14 14
15using namespace Opie; 15using namespace Opie;
16 16
17BatteryStatus::BatteryStatus( const PowerStatus *p, QWidget *parent ) 17BatteryStatus::BatteryStatus( const PowerStatus *p, QWidget *parent )
18 : QWidget( parent, 0, WDestructiveClose), ps(p) { 18 : QWidget( parent, 0, WDestructiveClose), ps(p), bat2(false) {
19 setCaption( tr("Battery status") ); 19 setCaption( tr("Battery status") );
20 QPushButton *pb = new QPushButton( tr("Close"), this ); 20 QPushButton *pb = new QPushButton( tr("Close"), this );
21 pb->move( 70, 250 ); 21 pb->move( 70, 250 );
22 pb->setMaximumHeight(20); 22 pb->setMaximumHeight(20);
23 pb->show(); 23 pb->show();
24 if ( ODevice::inst ( )-> series ( ) == Model_iPAQ ) { 24 if ( ODevice::inst ( )-> series ( ) == Model_iPAQ ) {
25 getProcApmStatusIpaq(); 25 getProcApmStatusIpaq();
26 } 26 }
27 connect( pb, SIGNAL( clicked() ), this, SLOT( close() ) ); 27 connect( pb, SIGNAL( clicked() ), this, SLOT( close() ) );
28 percent = ps->batteryPercentRemaining(); 28 percent = ps->batteryPercentRemaining();
29 show(); 29 show();
30} 30}