static void test_systeminfo(void) { QSystemInfo info; X(info.currentLanguage()); X(info.availableLanguages()); X(info.currentCountryCode()); X(info.version(QSystemInfo::Os)); X(info.version(QSystemInfo::QtCore)); X(info.version(QSystemInfo::Firmware)); X(info.version(QSystemInfo::QtMobility)); X(info.hasFeatureSupported(QSystemInfo::BluetoothFeature)); X(info.hasFeatureSupported(QSystemInfo::CameraFeature)); X(info.hasFeatureSupported(QSystemInfo::FmradioFeature)); X(info.hasFeatureSupported(QSystemInfo::IrFeature)); X(info.hasFeatureSupported(QSystemInfo::LedFeature)); X(info.hasFeatureSupported(QSystemInfo::MemcardFeature)); X(info.hasFeatureSupported(QSystemInfo::UsbFeature)); X(info.hasFeatureSupported(QSystemInfo::VibFeature)); X(info.hasFeatureSupported(QSystemInfo::WlanFeature)); X(info.hasFeatureSupported(QSystemInfo::SimFeature)); X(info.hasFeatureSupported(QSystemInfo::LocationFeature)); X(info.hasFeatureSupported(QSystemInfo::VideoOutFeature)); X(info.hasFeatureSupported(QSystemInfo::HapticsFeature)); X(info.hasFeatureSupported(QSystemInfo::FmTransmitterFeature)); }
/********************************************** * 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; }