Details
-
Bug
-
Resolution: Done
-
Not Evaluated
-
5.11, 5.12.1, 5.12
-
None
-
MacOS 10.14.3
-
-
0330db86fdd42ef1be1354cdbbd6e0ffc21d9a80
Description
the function QSysInfo::machineUniqueId() returns an empty QByteArray on MacOS
it seems that in the source code file qtbase/src/corelib/global/qglobal.cpp, line 2959, the uuidlen has a length of 36, instead of being 36+1 for the sysctlbyname call
// Darwin: no fixed value, we need to search by name
if (sysctlbyname("kern.uuid", uuid, &uuidlen, nullptr, 0) == 0 && uuidlen == sizeof(uuid))
return QByteArray(uuid, uuidlen - 1);