diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2015-04-08 16:56:22 -0700 |
---|---|---|
committer | Thiago Macieira <thiago.macieira@intel.com> | 2017-11-05 18:34:07 +0000 |
commit | 16fba4a28f119f87bbdad3f1e07b3df5b18953d2 (patch) | |
tree | 6e74ecd7776bc8b21b2e8a44d0132b41d28c4a6b /tests/manual | |
parent | dfbf5a7779d103ad31b0a06e6951b183f2355be6 (diff) |
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 <edward.welbourne@qt.io>
Diffstat (limited to 'tests/manual')
-rw-r--r-- | tests/manual/qsysinfo/main.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
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", |