From 16fba4a28f119f87bbdad3f1e07b3df5b18953d2 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Wed, 8 Apr 2015 16:56:22 -0700 Subject: QSysInfo: add a function that returns a somewhat permanent unique ID We can use the D-Bus / systemd machine-id file (which is a UUID without the dashes) on systems with D-Bus. On Windows, there's a value in the registry that is filled when Windows is installed, like on Linux. For BSD systems, the kernel has a UUID we can use too, so extract that. Task-number: QTBUG-63425 Change-Id: I27eaacb532114dd188c4ffff13d32f2e3c1d74bb Reviewed-by: Edward Welbourne --- tests/manual/qsysinfo/main.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'tests/manual') diff --git a/tests/manual/qsysinfo/main.cpp b/tests/manual/qsysinfo/main.cpp index 5b391e5dfd..85438dce65 100644 --- a/tests/manual/qsysinfo/main.cpp +++ b/tests/manual/qsysinfo/main.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2016 Intel Corporation. +** Copyright (C) 2017 Intel Corporation. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the test suite of the Qt Toolkit. @@ -133,6 +133,7 @@ int main(int argc, char *argv[]) printf("QSysInfo::productVersion() = %s\n", qPrintable(QSysInfo::productVersion())); printf("QSysInfo::prettyProductName() = %s\n", qPrintable(QSysInfo::prettyProductName())); printf("QSysInfo::machineHostName() = %s\n", qPrintable(QSysInfo::machineHostName())); + printf("QSysInfo::machineUniqueId() = %s\n", QSysInfo::machineUniqueId().constData()); const auto osv = QOperatingSystemVersion::current(); printf("QOperatingSystemVersion::current() = %s %d.%d.%d\n", -- cgit v1.2.3