Fix finding cursor position in words with accents

In positionInLigature() we were mixing indexes into the script item with
indexes into the entire string. The getClusterLength() function would expect
an attributes array for the current script item and it thus needs to be
adjusted by si->position. In addition, when looking for the next grapheme
boundary, we were comparing pos (which indexed the string) with end (which
indexed the script item). This has also now been fixed by adjusting for
si->position as well.

Task-number: QTBUG-30123
Change-Id: Id02e2eddcc5b7888eacb34bd1e39cc6911880ca1
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Use Q_UNLIKELY in qCDebug, qCTrace

By default debug, trace is disabled, so this can be marked as unlikely.

Change-Id: I221a688c953c1ff1fdfda65d2d99457785d3ff47
Reviewed-by: hjk <hjk121@nokiamail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Test that Qt tools can handle ' as a digit separator.

Change-Id: I0a3446d02184989c32367e66d4f5d9e464a56ec6
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Adding CI utilities to Android test script

It is now configurable if test results are stored in xml, plain text
or in both formats. Default is xml, like it was,
Max runtime is also configurable so that we can reduce the CI round.
With default setting it takes more than eight hours within current
CI node.
The latest test result dir is linked as latest.

Change-Id: I5d27cefe17e4f86648132db7ec104711d993c3de
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Fix the network proxy code for windows to detect properly services

This patch makes it so even sub processes of services are also
detected to be running in the context of a service. With the previous
code it would only detect that the current process is a service
and not the sub processes.

This fix makes sure we detect properly if the current process
is running in the context of a service. This is important to
detect properly the proxy configuration of the current user.

Change-Id: I110dee62597aec3f8e2f6925166a428f72d14fd0
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
iOS: Build libs (including Qt itself) for both simulator and device

Conceptually a Qt for iOS SDK or source build should support building
for both simulator and device, based on the same qmake binary and Qt
libraries. Qt Creator or Xcode should then be able to use the same Qt
version while still building for a single target at a time. This
applies to user libraries as well, which shouldn't require switching
to a different Qt when changing target platform from simulator to
device.

We achieve this by using Qt's exclusive_build feature, where we build
for the two targets in parallel, and then teach Xcode how to choose
the right library dynamically at build time.

Change-Id: I06d60e120d986085fb8686ced98f22f7047c4f23
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
xcb: Act on the _NET_ACTIVE_WINDOW event

It happens that we don't get a focus inn event for top level windows
when focus goes from a window mapped. But we do get a _NET_ACTIVE_WINDOW
event.

Task-number: QTBUG-34426
Change-Id: Id1d9eb708a968e0e8934e56dec19abe2dd203bc7
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
xcb: Compilefix #ifdef glx code

Change-Id: I4204cab76b2621318dda909d24ceb2abab6e0ba3
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
remove compiler warning

Change-Id: I40750320d21165333b195aca7564a6f4ee9d9eef
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Android: Fix problem with leaking local refs.

In some cases we where not releasing the local references and since we
no longer disconnect from the VM on each call, the number of local refs.
would accumulating until it hit the hard-limit of 512.

Change-Id: I6826620e4cb61a37af26d276667489e876080076
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
Android: Don't rely on QIcon::isNull() to validate icon data.

QIcon::isNull() only checks if it has a valid d pointer and not if it
actually contains any image data. The result is that the QImage create
from the icon would be invalid, and later cause an exception to be
thrown. To avoid this we should check the QImage as well.

Task-number: QTBUG-34416
Change-Id: I9dd0a2387d73bfc2c27ceb9df247ddc186dd659f
Reviewed-by: BogDan Vatra <bogdan@kde.org>
dbuscommon.pri: Fix source file dependency

Make already the creation of the generated cpp file depend on the
creation of the generated h file, which transitively ensures that
the cpp won't be compiled before the h is there.

Change-Id: Idd3aec8d72dac341e835a3d1ef8f2986dbc1ab9f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Fix QSpinBox size calculation problem with empty stylesheets

Task-number: QTBUG-34305

Change-Id: I3e89dc66446e9f5e9e1810be367830b9df98ab0b
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
Consider multi-monitor setups in QPlatformWindow::initialGeometry().

Task-number: QTBUG-34204

Change-Id: Id79efe33ece071ad94578b6ac0370b0f040d1c3c
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
xcode generator: resolve QMAKE_INFO_PLIST from source dir

If QMAKE_INFO_PLIST is set, check if the file it
points to is located inside the project source dir
rather than the build dir.

Change-Id: I6fb176349dae8e841b5e2dfdb9f9cb87f51a1e76
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
Update the ICC spec on Linux to actually compile stuff

I had the -fPIE option in my personalised "linux-icc-optimised" spec,
so I never noticed it was missing in the standard one.

I have no idea when -rpath-link is necessary. It isn't for me.

Task-number: QTBUG-34425
Change-Id: I54b2fb8cda10b9197d81b5630b1d29b8c338d96a
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
iOS: Fix logic for determining whether to exit the root event loop

Instead of trying to hook into various places where we might be in a
situation where the root event loop should exit, and then enabling the
runloop-observer, we always keep the observer active, and then do the
relevant checks whenever the run-loop exits.

The reason for checking if the event loop is running is that iOS will
enter and exit the root runloop as part of normal operation, eg due to
flicking a scroll view and switching the runloop mode, so we need to
ensure that we're actually supposed to exit the root event loop.

Change-Id: I9b84b47ee45e0c9e2b1d2ebb5a432ea92700b324
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
Windows: Do not use blend function for GL windows with alpha.

Task-number: QTBUG-34376

Change-Id: I81a5ee6ff14e5472eb1f3846577d86b615be34e0
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Merge remote-tracking branch 'upstream/stable' into wip/tizen

Change-Id: I5979d83c89a6b6529e32eb6c14fd642cedc8e12a