diff options
| author | sD <stoned@derpymail.org> | 2020-05-23 18:32:45 +0200 |
|---|---|---|
| committer | sD <stoned@derpymail.org> | 2020-05-23 18:32:45 +0200 |
| commit | 3329ce1416dbdf6fa9d1136468efa12fd40c7815 (patch) | |
| tree | 835a0351aee70ccd8806fea8a9534a1d706a5dd9 /src/hardware_functions.cpp | |
| parent | ba9aebec57d231236642f9e58329b1d87b264dbd (diff) | |
use new hdid method if supported
Diffstat (limited to 'src/hardware_functions.cpp')
| -rw-r--r-- | src/hardware_functions.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/hardware_functions.cpp b/src/hardware_functions.cpp index 82b4f0c7..6da642a5 100644 --- a/src/hardware_functions.cpp +++ b/src/hardware_functions.cpp @@ -1,6 +1,9 @@ #include "hardware_functions.h" #include <QDebug> +#include <QtGlobal> + +#if QT_VERSION < QT_VERSION_CHECK(5, 4, 0) #if (defined(_WIN32) || defined(_WIN64)) #include <windows.h> @@ -81,3 +84,16 @@ QString get_hdid() #error This operating system is unsupported for hardware functions. #endif + +#else +#include <QSysInfo> + +QByteArray machineId; + +QString get_hdid() +{ + machineId = QSysInfo::machineUniqueId(); + return QString(machineId); +} + +#endif |
