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: Hardcode qt_instdate a bit to prevent constant rebuild cascades.
Make handling of QEvent::Close consistent with QWindow::close()

The event handler would ignore the close if the window was hidden
while the close() function would not. In addition, the close()
function would force removal of focus etc while the event handler
did not. Make it consistent by calling close() from the event
handler.

Change-Id: Ia05b08299f218620fb40a8cad5d3771158c4701e
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
Don't crash when platform plugin sends us two close events.

Change-Id: Icfe2954908fad2abfb4195fc535aadd1e6302f76
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Merge pull request #2 from sletta/window-close

[qtbase] Backport QWindow::close() fixes from Qt 5.4
Call tzset() before localtime_r() as the docs say.

Without it, one might run the risk of QDateTime::currentDateTime()
returning an invalid QDateTime the first time after changing timezone.

Change-Id: I3efb04d41e7fe4685f6cc5fb41b68424eb4b9eb8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Merge pull request #3 from sletta/tzset

[qtbase] Call tzset() before localtime_r() as the docs say.
fix crash in connman bearer backend when accessing null objects

Change-Id: Ib199b4093d86d1596b630223d0734171ba0d82c5
Reviewed-by: Lorn Potter <lorn.potter@jollamobile.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Only take printable characters into account in text height calculation
Merge pull request #4 from Vesuri/mer-stable

Only take printable characters into account in text height calculation
[qtbase] Packaging: Don't let qtgui-devel depend on qtopengl-devel
[qtbase] Packaging: configure with -no-xkbcommon.

If present, it will build the compse platforminputcontext which
we are not packaging and not using.
Merge pull request #5 from sletta/packaging

Packaging
MER: Fixup libsystrace support

Match API changes to libsystrace. Also add an asyncBegin/asyncEnd call that we
can use for things that don't match up to duration events.

FIXUP: MER: Add libsystrace support.
Merge pull request #6 from rburchell/mer-stable

MER: Fixup libsystrace support
[qtbase] qtgui-devel must pull in libGLESv2-devel and libEGL-devel.