Perform kerning in QRawFont::advancesForGlyphIndexes

Being able to calculate advances for series of glyphs include kerning
is important to be able get kerning on QGlyphRun.

Note this kerning is only truetype kerning, since opentype kerning is performed
during shaping.

Change-Id: I8d7458066431cbdce699647056fd0d7a76b20aa2
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
tst_qlockfile: increase delay on Windows.

OpenProcess + WaitForSingleObject is supposed to fail after the process exits,
but this seems to take some time until Windows notices.

Change-Id: I942a9b4a458c23fc4ac33b28386e28821128e991
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Make sure that we #include qconfig.h before testing for features.

This is mandatory in public headers (qiodevice.h, qopengl*, etc.), but
it's a good idea even in private headers, in case someone includes
that header first somewhere. In particular, all platformsupport API is
private.

Change-Id: If287baa5d9ed14e93c1666efa0e6332c4c1cd9a4
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Make sure that signal disconnects don't disconnect too much

There has been a latent bug forever in QtDBus that would make a signal
disconnect actually disconnect too much. The reason is that
disconnectNotify() is called every time a signal is disconnected from
a receiver, but that doesn't mean it was the last connection.

This test checks whether disconnecting from voidSignal() to our test
receiver will also disconnect from exitLoop(). If it does, we'll get a
timeout. I could have implemented it with two receivers, but in the
buggy case, it would always fail first in the timeout verification.

Change-Id: I5766d8a38594eb25e65b304913251303660fad41
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Fix wildcard signal disconnection in QDBusAbstractInterface

This has been broken forever, just like generic signal
disconnection. It didn't use to show up before because in Qt 4,
QObject's destructor would not call disconnectNotify().

Just like in the previous commit, we need to verify whether the signal
was disconnected from the last receiver. A wildcard disconnect might
be disconnecting only from a specific receiver.

Task-number: QTBUG-29498
Change-Id: I0790128ea878fdf3ac563c99d96c6aa7d270e9a3
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Document ResourceError

From reading the code it can be ENOSPC or EMFILE

Change-Id: I2eecbf8afe0228d330210c25f299af12fab9cb64
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Add minimumtotal option to improve accuracy of short-lived benchmarks.

Short-lived benchmarks (benchmarks that complete in a very short period
of measured time) are often more affected by jitter and warm-up effects
than longer running benchmarks. Since QBENCHMARK stores the median
result of all accepted benchmark runs, a larger number of aggregation
runs is preferable for short-lived tests, but not necessarily for longer
running ones. The minimumtotal option, specified in units of the
selected measurement, will make the benchmark repeat a benchmark until
the total measured cost exceeds the specified threshold. The displayed
median result will then tend to be more accurate. This is especially
useful for data-driven benchmarks in case the data tags scale the
benchmarked operation from little to large cost.

Change-Id: Ib857de64aaffc77715a0000d36f0245f31d86b9a
Reviewed-by: Jason McDonald <macadder1@gmail.com>
Add check for libxkbcommon to the configure script

It is needed for implementing the shortcut functionality in the xcb platform
plugin and for the compose key input context plugin.

As announced on the wayland-devel mailing list - the libxkbcommon 0.2.0 is
the first grown-up release of the library (Tue Oct 23, 2012). [1]

[1] http://lists.freedesktop.org/archives/wayland-devel/2012-October/005976.html

Change-Id: Id5d45e1a5afe49cf9ec5312318bd173f5a067f62
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
Fix build on iOS by using QOPENGLF_APIENTRY intead of APIENTRY directly

QOPENGLF_APIENTRY masks over GL vs ES, as we need GL_APIENTRY on iOS,
where APIENTRY is not defined.

Change-Id: I60c097d67e0844c30913c913cf88a9b9e181813b
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
iOS: Use didFinishLaunchingWithOptions to support iOS < 6.0

UIApplicationDelegate's willFinishLaunchingWithOptions message was
introduced in 6.0. For now we don't need to distinguish the two, so
no need to use willFinishLaunchingWithOptions on iOS >= 6.0.

Change-Id: Ic6c2c9d2901def5a5500b186ed57fbe8b8c556d1
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
OSX: obey the Qt::WindowTransparentForInput flag

Ignoring the mouse means you don't get window enter/exit events for
that window either.

Task-number: QTBUG-30122
Change-Id: I979be9f72f7d225d7b960fc5db4c3956d2749982
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
OSX: a window which has WindowDoesNotAcceptFocus isn't first responder

Change-Id: If02ce190d93fcae18f1e1b41bc73c83b3226d4e7
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Move QTextEngine implementation details from QTextLayout

As of now, we'll have everything related to the additional formats handling
just in a single place. Make specialData private to prevent accessing it
from outside. This helped in tracking-down several related issues:
- in format(const QScriptItem *), the resolvedFormatIndices can not be empty
  at that point, so the code path is dead;
- in resolveAdditionalFormats(), testing if formats has not been indexed yet
  is not needed since they are indexed just in the setter;
- in useRawFont mode, hasFormats() didn't check if QTextEngine really
  has some formats, which potentially leads to formatting artifacts.

Change-Id: Id4b912888fd5a1fa83f01007170134b6386e2879
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Add an initial TI linker support for the unix qmake generator

Task-number: QTBUG-30215
Change-Id: Ica283e6b7f67563504ed81f4db1c2218fe5e8b8c
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Fix crash when trying to access accessible parent in dtor

Change-Id: I36a065facc0ea80b3a155eaf646613cbd86fdfac
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
QLocalePrivate: Add convenience language/script/country to code helpers

Change-Id: Id9126a95f1b3a75f510e642ab08c68cefaf3d142
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: John Layt <jlayt@kde.org>
BlackBerry: implement QWidget::showMinimized()

Add window minimization capability on the plugin.

Change-Id: I4539d29b8ebbef935213edde634f0a85b6a21766
Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Mark QtPrivate::ApplyReturnType constructor as explicit.

Else, the operator,(T, ApplyReturnType<void>) is sometimes chosen if a
pointer is passed, and that is breaking some decltype expressions.
(such as the one in ComputeFunctorArgumentCount in the next patch)

Change-Id: Ic203bbb1a8f5abbebb3b11786454807aa20be5fd
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Support connection to functor with multiple operator()

When variadic templates and decltype are supported, detect the best
overload of operator() to call.
Currently, the code takes the type of the operator(), which requires that
the functor only has one, and that it has no template parameter.

This feature is required if we want to connect to c++1y generic lambda
(N3418)

Change-Id: Ifa957da6955ea39ab804b58f320da9f98ff47d63
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
Document restrictions on the new connection syntax

... when the compiler do not support variadic template

Change-Id: Iec84cad8ece2fc28b0c224872fdd90d30ae60fc9
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>