summaryrefslogtreecommitdiffstats
path: root/tests/auto/qsystemdeviceinfo/tst_qsystemdeviceinfo.cpp
diff options
context:
space:
mode:
authorLorn Potter <lorn.potter@nokia.com>2010-09-23 09:15:44 +1000
committerLorn Potter <lorn.potter@nokia.com>2010-09-23 09:15:44 +1000
commit94cd460b26cee4a4a000e2d1b365bd719eb91a7c (patch)
tree9883441f529a32c0db9d2f00467b4d0ce313e738 /tests/auto/qsystemdeviceinfo/tst_qsystemdeviceinfo.cpp
parent74b7216a693f7a9cf41ed452b5c93a981d1d19a9 (diff)
parent94fab8630bd996815014dca6d97347e09cf68b7f (diff)
Merge branch 'master' into 1.2
Conflicts: src/systeminfo/qsysteminfo_linux_common.cpp src/systeminfo/qsysteminfo_linux_common_p.h
Diffstat (limited to 'tests/auto/qsystemdeviceinfo/tst_qsystemdeviceinfo.cpp')
-rw-r--r--tests/auto/qsystemdeviceinfo/tst_qsystemdeviceinfo.cpp34
1 files changed, 18 insertions, 16 deletions
diff --git a/tests/auto/qsystemdeviceinfo/tst_qsystemdeviceinfo.cpp b/tests/auto/qsystemdeviceinfo/tst_qsystemdeviceinfo.cpp
index 8a3368c3be..ffe757dabb 100644
--- a/tests/auto/qsystemdeviceinfo/tst_qsystemdeviceinfo.cpp
+++ b/tests/auto/qsystemdeviceinfo/tst_qsystemdeviceinfo.cpp
@@ -161,12 +161,13 @@ void tst_QSystemDeviceInfo::tst_batteryLevel()
QSystemDeviceInfo di;
QVERIFY(di.batteryLevel() > -1);
- if(di.currentPowerState() == QSystemDeviceInfo::WallPowerChargingBattery) {
- QSignalSpy batSpy(&di, SIGNAL(batteryLevelChanged(int)));
- QVERIFY(!batSpy.isEmpty());
- int level = batSpy.first().at(0).toInt();
- QVERIFY( level > -1 || level < 101);
- }
+// until we simulate this, or wait the signalspy to olong, this will always fail
+// if(di.currentPowerState() == QSystemDeviceInfo::WallPowerChargingBattery) {
+// QSignalSpy batSpy(&di, SIGNAL(batteryLevelChanged(int)));
+// QVERIFY(!batSpy.isEmpty());
+// int level = batSpy.first().at(0).toInt();
+// QVERIFY( level > -1 || level < 101);
+// }
}
void tst_QSystemDeviceInfo::tst_batteryStatus()
@@ -183,16 +184,17 @@ void tst_QSystemDeviceInfo::tst_batteryStatus()
QVERIFY(di.batteryStatus() == QSystemDeviceInfo::BatteryNormal);
}
- if(di.currentPowerState() == QSystemDeviceInfo::WallPowerChargingBattery) {
- QSignalSpy batSpy(&di, SIGNAL(batteryStatusChanged(QSystemDeviceInfo::BatteryStatus)));
- QVERIFY(!batSpy.isEmpty());
- QSystemDeviceInfo::BatteryStatus status = qvariant_cast<QSystemDeviceInfo::BatteryStatus>(batSpy.first().at(0));
- QVERIFY( status == QSystemDeviceInfo::NoBatteryLevel
- || status == QSystemDeviceInfo::BatteryCritical
- || status == QSystemDeviceInfo::BatteryVeryLow
- || status == QSystemDeviceInfo::BatteryLow
- || status == QSystemDeviceInfo::BatteryNormal);
- }
+ // until we simulate this, or wait the signalspy to olong, this will always fail
+// if(di.currentPowerState() == QSystemDeviceInfo::WallPowerChargingBattery) {
+// QSignalSpy batSpy(&di, SIGNAL(batteryStatusChanged(QSystemDeviceInfo::BatteryStatus)));
+// QVERIFY(!batSpy.isEmpty());
+// QSystemDeviceInfo::BatteryStatus status = qvariant_cast<QSystemDeviceInfo::BatteryStatus>(batSpy.first().at(0));
+// QVERIFY( status == QSystemDeviceInfo::NoBatteryLevel
+// || status == QSystemDeviceInfo::BatteryCritical
+// || status == QSystemDeviceInfo::BatteryVeryLow
+// || status == QSystemDeviceInfo::BatteryLow
+// || status == QSystemDeviceInfo::BatteryNormal);
+// }
}
void tst_QSystemDeviceInfo::tst_currentProfile()