eglfs: Add various debug prints to KMS hooks

Change-Id: Ib0284601fa4ce2912312999190e4a1e2dc2afe42
Reviewed-by: Risto Avila <risto.avila@theqtcompany.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
eglfs: Add better configuration support to KMS hooks

This patch improves the configurability of the KMS hooks. Support is added
for a json config file. The file can be used to specify the device to use,
whether pbuffers are supported, whether HW cursors should be used and the
mode to use per output.

The path to the configuration file is specified through the
QT_QPA_EGLFS_KMS_CONFIG environment variable.

The output initialization code is significantly changed and now closely
matches Weston's drm compositor setup code. We now track which crtc's and
which connectors are already in use for more robust output setup.

Importantly, it is now possible to turn off undesired outputs as well as
select the mode to use on outputs. The configuration syntax is similar
to Weston's config file, and the following settings are supported per
output:

 off, preferred, current, WIDTHxHEIGHT, modeline

Unless the output mode configuration matches "off", "preferred" or "current"
exactly, it is first attempted to parse the mode as WIDTHxHEIGHT, after
which it is attempted to parse the mode as a modeline. The modeline parsing
code is very closely modeled after the parsing code in Weston.

If an output mode cannot be parsed the default fallback is preferred mode.

The defaults for all settings are as follows:
 device: unless specified, the first device found through QDeviceDiscovery
 hwcursor: true
 pbuffers: false
 outputs: empty

An example configuration file might look as follows:

{
  "device": "/dev/dri/card1",
  "hwcursor": false,
  "pbuffers": true,
  "outputs": [
    {
      "name": "VGA1",
      "mode": "off"
    },
    {
      "name": "HDMI1",
      "mode": "1024x768"
    }
  ]
}

Change-Id: Ibe1e446c44a014ae8c7cbd8173a060ca862c2bc8
Reviewed-by: Risto Avila <risto.avila@theqtcompany.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Add some tools specific consistency tests

This upstreams parts of Qt Creator's tst_offset test to serve as
an early warning system by testing private implementation details
that are used in Qt Creator's data structure "pretty printing"
facility.

While the tested implementation details can be changed without
breaking binary or source compatibility, downstream tools like
Qt Creator depend on them.

If this test breaks, you are kindly asked to coordinate with the
downstream stakeholders to avoid tool breakage.

Change-Id: I1286efcec9bef105f80c2163a4f66f5c43f3a218
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Remove non-UNICODE code branches from ODBC plugin.

Task-number: QTBUG-39388
Change-Id: If22876454547098dd00e477c0593da7c4be0e803
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Fix MSVC warnings about integer conversions in ODBC driver.

qsql_odbc.cpp(360) : warning C4267: '=' : conversion from 'size_t' to 'int', possible loss of data
qsql_odbc.cpp(380) : warning C4267: 'initializing' : conversion from 'size_t' to 'int', possible loss of data
qsql_odbc.cpp(2052) : warning C4267: 'argument' : conversion from 'size_t' to 'SQLSMALLINT', possible loss of data
qsql_odbc.cpp(2070) : warning C4267: 'argument' : conversion from 'size_t' to 'SQLSMALLINT', possible loss of data
qsql_odbc.cpp(2096) : warning C4267: 'argument' : conversion from 'size_t' to 'SQLSMALLINT', possible loss of data

Task-number: QTBUG-39388
Change-Id: Ie97d9e968d5c7b013b0d364c64175aa9b329ae97
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
QObject: use QDebugStateSaver in the QDebug operator<<

Also remove the ending space if the object is null

Change-Id: Ieb2bb903de35b4e339c812cd07555b5d108d118b
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
Add Q_DECL_RELAXED_CONSTEXPR macro

Expands to constexpr if C++14 relaxed constepxr are supported by the compiler

[ChangeLog][QtCore] Added Q_DECL_RELAXED_CONSTEXPR for the corresponding C++14 feature

Change-Id: Id6b56b3a17da2ff838c80795e528e1247dc13f63
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>