Commit Graph

9 Commits

Author SHA1 Message Date
Thiago Macieira
ed48a03b21 QSysInfo: add a function that returns the boot ID
[ChangeLog][QtCore][QSysInfo] Added machineUniqueId() and
bootUniqueId().

Task-number: QTBUG-63425
Change-Id: I0b48fc8e90304e0dacc3fffd14e91064020d165b
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2017-11-05 18:34:09 +00:00
Thiago Macieira
16fba4a28f 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>
2017-11-05 18:34:07 +00:00
Jake Petroules
8a48d66da9 Deprecate QSysInfo::MacVersion, QSysInfo::WindowsVersion, etc
QSysInfo::WinVersion, QSysInfo::WindowsVersion,
QSysInfo::windowsVersion(), QSysInfo::MacVersion,
QSysInfo::MacintoshVersion, and QSysInfo::macVersion() are now
deprecated.

QOperatingSystemVersion exists as a more flexible replacement.

Change-Id: Ib97d1bfb260f2595ba3c06ff8fd251c5de41cedc
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-09-20 06:46:14 +00:00
Jake Petroules
95ea1b1aa8 Remove all code paths related to unsupported Apple platforms.
Now that the minimum deployment target (and thus SDK) is 10.9 for OS X
and 7.0 for iOS, all code paths affecting platform versions lower than
the aforementioned are removed.

Change-Id: Id985c7259c4ac069319d88f2c29c9559ae9e8641
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2016-06-04 09:24:33 +00:00
Friedemann Kleint
b4d2ae0676 Remove remains of Windows CE from QSysInfo.
Remove documentation of enumeration values and code from manual test.

Change-Id: I8e6cbbe11ab38421fb29595ae79351f5a919ff70
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2016-04-30 10:33:04 +00:00
Thiago Macieira
23bd4651c7 Update the Intel copyright year
Not that we require it, but since The Qt Company did it for all files
they have copyright, even if they haven't touched the file in years
(especially not in 2016), I'm doing the same.

Change-Id: I7a9e11d7b64a4cc78e24ffff142b4c9d53039846
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2016-01-21 22:44:16 +00:00
Jani Heikkinen
f776595cc1 Updated license headers
From Qt 5.7 -> tools & applications are lisenced under GPL v3 with some
exceptions, see
http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/

Updated license headers to use new GPL-EXCEPT header instead of LGPL21 one
(in those files which will be under GPL 3 with exceptions)

Change-Id: I42a473ddc97101492a60b9287d90979d9eb35ae1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2016-01-21 18:55:18 +00:00
Thiago Macieira
01d0b1d6e3 Merge the multiple implementations of getting the local hostname
This commit moves the functionality from QtNetwork's QHostInfo to
QtCore. Note that due to Windows ws2_32.dll's quirky behavior of
requiring WSAStartup before calling gethostname, this change required
moving the initialization to QtCore too.

On Linux systems, gethostname() gets the name from uname(), so we bypass
the middle man and save one memcpy.

Change-Id: I27eaacb532114dd188c4ffff13d32655a6301346
Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-08-13 16:34:51 +00:00
Thiago Macieira
41ef1965c5 QSysInfo: expand Linux distribution detection to /etc/lsb-release
Some older (or weird) Linux distributions don't have /etc/os-release, so
let's try to read /etc/lsb-release instead. If we find a file called
/etc/<distronamelowercase>-release and it's bigger than the pretty name
we read from /etc/lsb-release, use that.

Because the order of the keys changes between the two *-release files,
we can't do a sorted search anymore.

Change-Id: I1a800c709d3543699131ffff13c48532d5074f3c
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Dirk Hohndel <dirk@hohndel.org>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-02-25 15:49:20 +00:00