aboutsummaryrefslogtreecommitdiff
path: root/src/hardware_functions.cpp
diff options
context:
space:
mode:
authoroldmud0 <oldmud0@users.noreply.github.com>2020-08-13 10:47:50 -0500
committeroldmud0 <oldmud0@users.noreply.github.com>2020-08-13 10:48:53 -0500
commite88f885a9f69909bd759b8cc81e089f85ee58930 (patch)
treef8358f05bef0bb93b2ef132774fc7b31250dcb46 /src/hardware_functions.cpp
parent593e9d7353f601f81bbe26925ace4966434e7370 (diff)
parentec1c95bdb33dd063880c4cb6c3c9c3cf5d0ed454 (diff)
Merge master with some older CI changes
Diffstat (limited to 'src/hardware_functions.cpp')
-rw-r--r--src/hardware_functions.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/hardware_functions.cpp b/src/hardware_functions.cpp
index 96c72eb5..2f3c44d3 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, 11, 0)
#if (defined(_WIN32) || defined(_WIN64))
#include <windows.h>
@@ -49,6 +52,7 @@ QString get_hdid()
}
#elif defined __APPLE__
+
#include <CoreFoundation/CoreFoundation.h>
#include <IOKit/IOKitLib.h>
@@ -80,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