homescreenapp/examples/batterywidgetplugin/src/batterywidget.cpp
changeset 85 35368b604b28
parent 61 2b1b11a301d2
--- a/homescreenapp/examples/batterywidgetplugin/src/batterywidget.cpp	Wed Aug 18 09:40:07 2010 +0300
+++ b/homescreenapp/examples/batterywidgetplugin/src/batterywidget.cpp	Thu Sep 02 20:17:27 2010 +0300
@@ -15,10 +15,6 @@
 *
 */
 
-
-//#define OWN_TESTING
-
-
 #include <QGraphicsLinearLayout>
 #include <QPainter>
 #include <QTimer>
@@ -246,19 +242,13 @@
     mChargingTimer->stop();
     mChargingTimer->disconnect(this);
     connect(mDeviceInfo, SIGNAL(powerStateChanged(QSystemDeviceInfo::PowerState)), SLOT(powerStateChanged(QSystemDeviceInfo::PowerState)));
-#ifdef OWN_TESTING
-    connect(mChargingTimer, SIGNAL(timeout()), this, SLOT(updateChargingBatteryValue()));
-    mChargingTimer->start(1000);
-#else
     if (mDeviceInfo->currentPowerState() == QSystemDeviceInfo::WallPowerChargingBattery) {
         connect(mChargingTimer, SIGNAL(timeout()), this, SLOT(updateChargingBatteryValue()));
         mChargingTimer->start(500);
     } else {
-        connect(mDeviceInfo, SIGNAL(batteryStatusChanged(QSystemDeviceInfo::BatteryStatus)), SLOT(batteryStatusChanged(QSystemDeviceInfo::BatteryStatus)));
         connect(mDeviceInfo, SIGNAL(batteryLevelChanged(int)), SLOT(batteryLevelChanged(int)));
         mBatteryValue = mDeviceInfo->batteryLevel();
     }
-#endif    
     drawBatteryImage();
     update();
 }