Fix widget margins on Mac with style sheets

Previously we have rejected this issue as you can work around it
by setting Qt::WA_LayoutUsesWidgetRect per widget. However there
is no reason to apply the negative mac style layout margins on any
custom style so I think we should completely bypass it unless the
native border is used.

Task-number: QTBUG-13050
Change-Id: I8923e07d868c51a13587993c9b2ce79c51beaeee
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Use QtPlatformHeaders to set platform specific functionality

This involves exposing a new function in the QPlatformNativeInterface
which gets a public function for QGuiApplication

Proof of concept is done through implementing _NET_WM_WINDOW_TYPE
setters for xcb

Change-Id: Ic9544e775fb71cc9b30273595ec41b1cdb1c9d64
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Add support for querying "display" from eglfs

Return the native display which, with the x11 hooks, is the X11 Display*.
This gives compatibility with xcb and allows QtWebEngine to run on eglfs
in regular desktop builds without ozone. (this requires eglfs built with the
x11 hooks of course)

Change-Id: I8d25e2835c41a7e78f063a57a7d6c6b5e53a19b4
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
Support adopting an existing EGLContext in eglfs and xcb

Add also a manual test application. For GLX there is an autotest since
that is likely to be run on one of the CIs. For EGL and especially
eglfs this is likely not the case so a manual test is better.

Task-number: QTBUG-37552
Change-Id: Ib09db5d909befb68d16f69abd401a56abe55f28a
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
Add QSysInfo::cpuArchitecture() and fullCpuArchitecture()

This uses the same logic as the config.test, so we will return the same
string as the $$QT_ARCH variable in qmake for cpuArchitecture().

fullCpuArchitecture() is meant to be used in upgrade mechanisms, when
combined with the OS type.

Change-Id: If0dfee9eff75a07fa4c0778d204e0e768bf43074
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Add QSysInfo::osType()

This function returns the OS kernel type. It's usually the same as the
first part of the mkspec, in qmake, or the result of uname. Usually,
because it's not the case for a few systems, like Android, OS X, iOS,
BlackBerry, etc.

Change-Id: I295d92048d33ef02987e8696772ea89e925428d3
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
Reviewed-by: Sergio Ahumada <sahumada@blackberry.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Add QSysInfo::osVersion() and prettyOsName()

Change-Id: I85ae6c434ba3125802fc94e3a4ec7d01b07eac35
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Add QSysInfo::osKernelVersion()

Change-Id: If9a41d8b9530d36b2b574fdb93111ed556e8bdf2
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Implement QSysInfo::osVersion() for BlackBerry

Change-Id: I4bab6f475ba812bb92f9a185528c54f28392355c
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
Reviewed-by: Sergio Ahumada <sahumada@blackberry.com>
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
Don't open /etc/os-release outside Linux and Debian GNU/kFreeBSD

It's not likely to exist outside them, so let's save on the code size.

Change-Id: I72f139ccd1367f218b33cb926dae58696a83a82e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>