/********************************************** * void DeviceInfoProvider::getSystemInfo *********************************************/ void DeviceInfoProvider::getSystemInfo() { QSystemInfo *si = new QSystemInfo(this); QSystemDeviceInfo *di = new QSystemDeviceInfo(this); m_deviceVersion = si->version(QSystemInfo::Firmware).isEmpty() ? m_deviceVersion : si->version(QSystemInfo::Firmware); m_serialNo = di->imei().isEmpty() ? m_serialNo : di->imei(); m_manufacturer = di->manufacturer().isEmpty() ? m_manufacturer : di->manufacturer(); m_model = di->model().isEmpty() ? m_model : di->model(); delete si; delete di; }
static void test_systemdeviceinfo(void) { QSystemDeviceInfo deviceinfo; X(deviceinfo.batteryLevel()); X(deviceinfo.batteryStatus()); X(deviceinfo.currentBluetoothPowerState()); X(deviceinfo.currentPowerState()); X(deviceinfo.currentProfile()); X(deviceinfo.imei()); X(deviceinfo.imsi()); X(deviceinfo.inputMethodType()); X(deviceinfo.isDeviceLocked()); X(deviceinfo.isKeyboardFlippedOpen()); X(deviceinfo.isWirelessKeyboardConnected()); X(deviceinfo.keyboardTypes()); X(deviceinfo.manufacturer()); X(deviceinfo.model()); X(deviceinfo.productName()); X(deviceinfo.simStatus()); X(deviceinfo.lockStatus()); X(deviceinfo.uniqueDeviceID()); X(deviceinfo.keypadLightOn(QSystemDeviceInfo::PrimaryKeypad)); X(deviceinfo.keypadLightOn(QSystemDeviceInfo::SecondaryKeypad)); X(deviceinfo.activeProfileDetails().messageRingtoneVolume()); X(deviceinfo.activeProfileDetails().voiceRingtoneVolume()); X(deviceinfo.activeProfileDetails().vibrationActive()); }