diff options
author | Lorn Potter <lorn.potter@nokia.com> | 2010-12-07 15:20:56 +1000 |
---|---|---|
committer | Lorn Potter <lorn.potter@nokia.com> | 2010-12-07 15:20:56 +1000 |
commit | 91aa27cb84b91289261af9e69b2e1e945f60fa5c (patch) | |
tree | 33c34d3ffcb1d3fab4f2b24fdc158617e9151b40 /tests/auto/qsystemdeviceinfo/tst_qsystemdeviceinfo.cpp | |
parent | 543782bf651f93fc4fdf10655fde9cd4b8051f2f (diff) |
add profile details.
Diffstat (limited to 'tests/auto/qsystemdeviceinfo/tst_qsystemdeviceinfo.cpp')
-rw-r--r-- | tests/auto/qsystemdeviceinfo/tst_qsystemdeviceinfo.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/auto/qsystemdeviceinfo/tst_qsystemdeviceinfo.cpp b/tests/auto/qsystemdeviceinfo/tst_qsystemdeviceinfo.cpp index c65d5c73e5..3c8de88b6b 100644 --- a/tests/auto/qsystemdeviceinfo/tst_qsystemdeviceinfo.cpp +++ b/tests/auto/qsystemdeviceinfo/tst_qsystemdeviceinfo.cpp @@ -88,6 +88,7 @@ private slots: void tst_keypadLightOn(); void tst_uniqueID(); void tst_lockStatus(); + void tst_getActiveProfileDetails(); }; /* @@ -305,5 +306,19 @@ void tst_QSystemDeviceInfo::tst_lockStatus() } } +void tst_QSystemDeviceInfo::tst_getActiveProfileDetails() +{ + QSystemDeviceInfo di; + QSystemDeviceInfo::ActiveProfileDetails *details = di.getActiveProfileDetails(); + int vol = details->messageRingtoneVolume(); + int vol2 = details->voiceRingtoneVolume(); + bool vib = details->vibrationActive(); + if(di.currentProfile() != QSystemDeviceInfo::UnknownProfile) { + QVERIFY(vol > -1 && vol < 101); + QVERIFY(vol2 > -1 && vol2 < 101); + QVERIFY(vib || !vib); + } +} + QTEST_MAIN(tst_QSystemDeviceInfo) #include "tst_qsystemdeviceinfo.moc" |