From 3329ce1416dbdf6fa9d1136468efa12fd40c7815 Mon Sep 17 00:00:00 2001 From: sD Date: Sat, 23 May 2020 18:32:45 +0200 Subject: [PATCH] use new hdid method if supported --- src/hardware_functions.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/hardware_functions.cpp b/src/hardware_functions.cpp index 82b4f0c..6da642a 100644 --- a/src/hardware_functions.cpp +++ b/src/hardware_functions.cpp @@ -1,6 +1,9 @@ #include "hardware_functions.h" #include +#include + +#if QT_VERSION < QT_VERSION_CHECK(5, 4, 0) #if (defined(_WIN32) || defined(_WIN64)) #include @@ -81,3 +84,16 @@ QString get_hdid() #error This operating system is unsupported for hardware functions. #endif + +#else +#include + +QByteArray machineId; + +QString get_hdid() +{ + machineId = QSysInfo::machineUniqueId(); + return QString(machineId); +} + +#endif