Remove QT_HAS_CONNECTIONAGENT define.

There is no link-time functionality here, it's purely runtime-detectable (which
we already do anyway), so this define does nothing except to increase
maintenence burden unnecessarily, as the code falls back correctly.

Furthermore, such detection introduces circular dependencies: connectionagent
requires Qt to build, this made Qt require connectionagent to build correctly.

As a bonus, fix compilation of the code inside this define: when linking to
private headers, we must add it to QT, and prefix the header with private/.

Change-Id: Ie7a19baaf1ffbe831066fe2d4208cc3e03905a4d
make sure connman bearer service is autconnect before connecting

Change-Id: I4c9a93d69f7fe990bf9d7f2e939abbe2c82ba449
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
MER: Add libsystrace support.

[MER]: This patch is not upstreamed as libsystrace is not widely in use, the
impact of additional function calls into QtBase was undesired, and the general
approach is not really generic to other types of tracing at this time.

libsystrace is a very small initialized-on-load wrapper for Android systrace
functionality, used so that data is written in order, regardless of how many
different libraries are writing data to it at a given time.

systrace is very useful for tracking system behavior, and for performance
analysis and improvement.

See also:
https://developer.android.com/tools/debugging/systrace.html

Some example uses of QSystraceEvent are also included in this patch. More are
undoubtedly possible. Additional tracing (e.g. counting the number of ongoing
HTTP requests and various other bits and pieces) are also easily accomplished.

Change-Id: I70012f6ddaa084f5b08685ee40795d7fafcd9c96
Expose QPlatformWindow::invalidateSurface as a virtual function.

This can be quite useful on some embedded systems to free up
graphics memory when windows are not used. QEglFSWindow already
implements the function.

Change-Id: I79b08efbd3c67d7be34df6a0e12dd184a92d48c5
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Prevent QUnifiedTimer from ticking backwards.

This could happen in the following situation:
* a custom animation driver with fixed delta
* a triple-buffering scheme (rendering ahead a frame)
* a second animation timer starting while a first was active

This would cause QUnifiedTimer::startTimers() to trigger
QUnifiedTimer::updateAnimationTimers(-1), and use the current time from
the QElapsedTimer rather than the animation driver. This time could be
less than the last reported time from the animation driver.

Change-Id: Ibf1796fcb99f288d4946b30e5e7225695aa61781
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
MER: Add libsystrace support.

[MER]: This patch is not upstreamed as libsystrace is not widely in use, the
impact of additional function calls into QtBase was undesired, and the general
approach is not really generic to other types of tracing at this time.

libsystrace is a very small initialized-on-load wrapper for Android systrace
functionality, used so that data is written in order, regardless of how many
different libraries are writing data to it at a given time.

systrace is very useful for tracking system behavior, and for performance
analysis and improvement.

See also:
https://developer.android.com/tools/debugging/systrace.html

Some example uses of QSystraceEvent are also included in this patch. More are
undoubtedly possible. Additional tracing (e.g. counting the number of ongoing
HTTP requests and various other bits and pieces) are also easily accomplished.

Change-Id: I70012f6ddaa084f5b08685ee40795d7fafcd9c96