use new hdid method if supported

This commit is contained in:
sD 2020-05-23 18:32:45 +02:00
parent ba9aebec57
commit 3329ce1416

View File

@ -1,6 +1,9 @@
#include "hardware_functions.h" #include "hardware_functions.h"
#include <QDebug> #include <QDebug>
#include <QtGlobal>
#if QT_VERSION < QT_VERSION_CHECK(5, 4, 0)
#if (defined(_WIN32) || defined(_WIN64)) #if (defined(_WIN32) || defined(_WIN64))
#include <windows.h> #include <windows.h>
@ -81,3 +84,16 @@ QString get_hdid()
#error This operating system is unsupported for hardware functions. #error This operating system is unsupported for hardware functions.
#endif #endif
#else
#include <QSysInfo>
QByteArray machineId;
QString get_hdid()
{
machineId = QSysInfo::machineUniqueId();
return QString(machineId);
}
#endif