2017-03-02 10:50:31 +01:00
|
|
|
#include "utils/SysInfo.h"
|
|
|
|
|
2017-03-04 22:17:42 +01:00
|
|
|
#include <QHostInfo>
|
2017-03-02 10:50:31 +01:00
|
|
|
#include <QSysInfo>
|
|
|
|
|
|
|
|
SysInfo* SysInfo::_instance = nullptr;
|
|
|
|
|
|
|
|
SysInfo::SysInfo()
|
|
|
|
: QObject()
|
|
|
|
{
|
2020-05-12 19:51:19 +02:00
|
|
|
_sysinfo.kernelType = QSysInfo::kernelType();
|
|
|
|
_sysinfo.kernelVersion = QSysInfo::kernelVersion();
|
|
|
|
_sysinfo.architecture = QSysInfo::currentCpuArchitecture();
|
2017-03-04 22:17:42 +01:00
|
|
|
_sysinfo.wordSize = QString::number(QSysInfo::WordSize);
|
2020-05-12 19:51:19 +02:00
|
|
|
_sysinfo.productType = QSysInfo::productType();
|
|
|
|
_sysinfo.productVersion = QSysInfo::productVersion();
|
|
|
|
_sysinfo.prettyName = QSysInfo::prettyProductName();
|
2017-03-04 22:17:42 +01:00
|
|
|
_sysinfo.hostName = QHostInfo::localHostName();
|
2020-05-12 19:51:19 +02:00
|
|
|
_sysinfo.domainName = QHostInfo::localDomainName();
|
2017-03-02 10:50:31 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
SysInfo::~SysInfo()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
SysInfo::HyperionSysInfo SysInfo::get()
|
|
|
|
{
|
2020-06-28 23:12:22 +02:00
|
|
|
if (SysInfo::_instance == nullptr)
|
2017-03-02 10:50:31 +01:00
|
|
|
SysInfo::_instance = new SysInfo();
|
|
|
|
|
2020-05-12 19:51:19 +02:00
|
|
|
return SysInfo::_instance->_sysinfo;
|
2017-03-02 10:50:31 +01:00
|
|
|
}
|