Enable tslib autodetection in configure

Change-Id: I4adbae621e4baa3a24e22a5b5832a08edfab377e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Andy Nichols <andy.nichols@digia.com>
Simplify using tslib with eglfs

tslib support can now be built-in into eglfs, like evdev.

Set QT_QPA_EGLFS_TSLIB to 1 to use tslib instead of evdevtouch.

The input device can be controlled via TSLIB_TSDEVICE.

Change-Id: Iff6bdbb4d133f73eca5528705844862236f8752b
Reviewed-by: Andy Nichols <andy.nichols@digia.com>
QtDBus: use qEnvironmentVariableIntValue()

It doesn't allocate memory, so cannot throw and is a lot faster
than qgetenv().

Change-Id: Ib0c0f903531a3a656919e87df8065a9c6c7a666c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Do Q_CHECK_PTR on all results of QArrayData::allocate()

QArrayData::allocate() uses malloc() which can return 0. We need to
check for that when using it inside other containers. The containers
might otherwise return a seemingly valid result from some allocating
operation which is actually corrupt.

Task-number: QTBUG-41231
Change-Id: I16cc6035e4f495f519bd38bf29cee080ee0637f6
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Don't dereference pointers on QArrayData deallocation

If the allocation fails the pointer will be 0. That is OK for free(),
but we shouldn't try to check for static data then.

Change-Id: I0a8860c9e04833e3be79f7a8a39bdaffeb488f35
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Check for integer overflows in places where qAllocMore is used

Task-number: QTBUG-41230
Change-Id: I5e932c2540c0bd67f13fab3ae20975d459f82c08
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
qdoc: qdoc was too slow

The hard-coded search order is now removed. The search order
is now constructed from the depends variable in the qdocconf
file.

The basic idea is that qdoc is run once. It gets a list of all the
qdocconf files for the modules in Qt5.
First, qdoc runs in -prepare mode for each qdocconf file in the list. It
generates the index file for each module, but these index files are
never used. At the end of the -prepare phase for each module, qdoc keeps
the tree structure for the module in a collection of trees.
Second, qdoc runs in -generate mode for each qdocconf file in the list.
But now it uses the existing tree for that module, so it doesn't have to
read the sources files again, and it doesn't have to read any index
files. Now it generates the docs for each module.

The runtime for qdoc has been reduced
by 90% when running qdoc for all of Qt5 on a not so new iMac.
Before this update, qdoc took about 10 minutes to generate
docs for Qt5. Now it takes a little over 1 minute. The new
way to run qdoc is described in the Qt bug report referenced
here.

Note that running qdoc this new (old) way also generates
fewer qdoc errors than when running qdoc the old way. This
indicates that the index files qdoc uses when running the
old way are incomplete.

Note also that the old way of running qdoc is not affected
by this update. The old way is still required for running
qdoc in the current qmake/make system. That process must be
changed to be able to use the faster qdoc. The details are
provided in the Qt bug report.

Change-Id: Ibec41d6fbaa9fc8cd070a05d04357bd02c4478f0
Task-number: QTBUG-41705
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
qdoc: Generate QA pages

qdoc has a new command line option, -write-qa-pages. Using this
flag on the command line will tell qdoc to generate a QA html page
in each module's output directory. The QA page contains information
that is useful for Quality Assurance checking of the module's docs.
The QA file name begins with "aaa" so it will always be listed at
the top of the output directory. The file name for the QA file for
QtCore, for example, is aaa-qtcore-qa-page.html.

Currently, the QA page only contains a report listing the intermodule
link count for each module that is the target of links from the
documented module.

The link report can be used to optimize the search order qdoc uses
when resolving inter-module links. By default, the search order
is the same as the ordering of the modules in the depends list
in the .qdocconf file. Using the report, the user can reorder
that list according to the number of links found in each module.
i.e. in descending order of link count.

The modules are listed in descending order of link count.
Additionally, an actual depends variable is printed. It can
be cut and pasted into the module's qdocconf file.

Change-Id: I442596aeb54dcdd5db4a0821096a5273c15627e6
Task-number: QTBUG-41850
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
eglfs: Make KMS hooks compile on older systems

drmModeSetCursor2 has not been available for very long and doesn't
actually buy us much, so don't use it. Also one more missing cast.

Change-Id: I1120b933759bbabf73edd23bfc837a2a27a93a0c
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
eglfs: try to query real cursor size instead of hardcoding 64x64

We still fall back to 64x64 if the query fails for either width or height.

Change-Id: I39682f30c94cfd9932667a9bb15947e50ee0de1d
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
fix PRECOMPILED_SOURCE regression in vc(x)projs

Commit af760349 in Qt4 broke the possibility of having a
PRECOMPILED_SOURCE in a different directory than the
PRECOMPILED_HEADER.
Do not write the PrecompiledHeaderThrough value for the
PRECOMPILED_SOURCE, but use the project default.
The msbuild code path needed adjustments to write the
UsePrecompiledHeader value, even if PrecompiledHeaderThrough is
empty.

Task-number: QTBUG-41917
Change-Id: I74e621f6618cf056e3967c99a2215f76c346b9ee
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>