mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2023-10-10 13:36:59 +02:00
458113f8f9
* Improve utils code style * Fix indendation Co-authored-by: brindosch <edeltraud70@gmx.de>
33 lines
838 B
C++
33 lines
838 B
C++
#include "utils/SysInfo.h"
|
|
|
|
#include <QHostInfo>
|
|
#include <QSysInfo>
|
|
|
|
SysInfo* SysInfo::_instance = nullptr;
|
|
|
|
SysInfo::SysInfo()
|
|
: QObject()
|
|
{
|
|
_sysinfo.kernelType = QSysInfo::kernelType();
|
|
_sysinfo.kernelVersion = QSysInfo::kernelVersion();
|
|
_sysinfo.architecture = QSysInfo::currentCpuArchitecture();
|
|
_sysinfo.wordSize = QString::number(QSysInfo::WordSize);
|
|
_sysinfo.productType = QSysInfo::productType();
|
|
_sysinfo.productVersion = QSysInfo::productVersion();
|
|
_sysinfo.prettyName = QSysInfo::prettyProductName();
|
|
_sysinfo.hostName = QHostInfo::localHostName();
|
|
_sysinfo.domainName = QHostInfo::localDomainName();
|
|
}
|
|
|
|
SysInfo::~SysInfo()
|
|
{
|
|
}
|
|
|
|
SysInfo::HyperionSysInfo SysInfo::get()
|
|
{
|
|
if (SysInfo::_instance == nullptr)
|
|
SysInfo::_instance = new SysInfo();
|
|
|
|
return SysInfo::_instance->_sysinfo;
|
|
}
|