Fix advance of zero-width spaces in fonts that omits the glyph

Some fonts appear to include zero-width space in the CMAP table, but
not include an actual definitions of the glyph they point to. The
missing glyph causes a warning, but isn't handled making the character
end up being giving the same metrics as whatever character it came after.

This patch adds explicit handling of missing glyphs, and also caches
their missing state when caching is enabled.

Task-number: QTBUG-40912
Change-Id: I06fba9c01df59548e750e36babfdd5a6bafd6bd0
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
Windows QPA plugin: Streamline code to find window at a position.

Task-number: QTBUG-40815
Change-Id: I0efcc2cfcafdee04bda20afa88a7f6aaabd57210
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
iOS: Initialize QScreen properties before setting up root viewcontroller

Change-Id: I5fd899030b0557e9b0d96f2c065c8be5cfadd5de
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
Prevent current context from becoming inconsistent upon create()

Platform plugins have a tendency to make the newly created native
context current with a temporary surface. This is usually needed to
query some information related to the new context. Afterwards most of
them just reset to having nothing current.

This has two issues:

It unexpectedly changes the current context/surface. A call into
QOpenGLContext::create() does not imply that the current context will
get changed. This is the minor issue and we could probably live with
it (at least if it had been documented).

However, the real issue is that QOpenGLContext::currentContext() will
become inconsistent: it will still report whatever was current before
the create() even though on the EGL/WGL/GLX level that's not the case
anymore.

To prevent all this confusion the platform plugins can easily be
changed to restore whatever context/surface was current before they
altered it.

Change-Id: I6a5b4597c86571327524ddb13e0d02538593cc7b
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
ANGLE: Don't directly link to DirectX 11

These libraries are dynamically loaded on desktop Windows.

Change-Id: I3a0d17a48a3bd4930690d20d387df0d92906662d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
ANGLE: Fix -angle-d3d11 on MSVC2010

Allow the D3D11 renderer to build with the June 2010 DirectX SDK.

Change-Id: I2343acedab16845d6a0d4a53cf3145f583efc4a7
Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Fix no-opengl build

Change-Id: I577bd5d10e52571c95c9e646327264cf95ac6eb1
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
winrt: Fix mouse coordinates on high-DPI displays

The scale factor was only being applied to touch coordinates.

Change-Id: I7fc2793b1514c73986a574a95478306c1eb54c5e
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
direct2d: Fix translucent/frameless window rendering

When using WA_TranslucentBackground/FramelessWindowHint, the backing
store must paint to an offscreen texture instead of the swap chain in
order to achieve the desired results. This texture is then presented to
the screen using UpdateLayeredWindowIndirect().

As the swap chain is not needed in this mode, its construction is skipped
if indirect rendering is active.

Furthermore, the layering options were updated to fix an issue with
transparent layers overpainting the background. The layer options were
switched to D2D1_LAYER_OPTIONS1_NONE, which appears to work for both
translucent and non-translucent rendering modes.

Task-number: QTBUG-40601
Change-Id: I656f7cdfb424d1eda6f82c2c69500e78d8c1726a
Reviewed-by: Louai Al-Khanji <louai.al-khanji@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Fix radioButton height for Windows style

Change-Id: I755ed32f7458fec0fcbc5243d25fb1f6ecf46492
Task-number: QTBUG-32420
Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
QIconLoader: enable an easy case of transactional processing

It's easy to do the work on the side and then commit. This is strongly
exception safe, but in Qt, we don't care. But transactional code, when
this easy to achieve, is also clearer.

Change-Id: I30f1badec7745d62a09af4eede234cb312b373aa
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
QTextEngine: remove unnecessary assignment in LayoutData::reallocate()

Change-Id: I82e34d5525354fc20ca9aba6df3767e3fee51bf8
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Make the EGL platform cursor reset the array buffer

Otherwise bad things happen if the application leaves a buffer bound.

[ChangeLog] The eglfs mouse cursor properly resets the array buffer
to prevent rendering issues. This, just like with vertex attributes and
textures, requires applications to be aware of such state changes in
swapBuffers().

Change-Id: I8b383cc867d8d0d0572773eacfa650e7b33b9680
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
qasn1element: add QAsn1Element::toInteger

This change adds the ability to decode ASN.1 INTEGER fields,
provided they represent a positive number of less than 64-bit.

This is needed for PKCS#12 decoding.

Change-Id: Iafb76f22383278d6773b9e879a8f3ef43c8d2c8f
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Windows XP, Vista styles: Share dynamically resolved theme functions.

Extract a struct containing the function pointers and derive
QWindowsXPStylePrivate from it, so that both styles can use them.
Remove duplicated variables.

Task-number: QTBUG-38858
Change-Id: I7c2c665b5930c56ffdf33c5185720f71517d146c
Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
iOS: Add support for QWindow::setOpacity()

Change-Id: I027154aef35d219f08915e195f2baf8595ef7343
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
iOS: Get rid of markedTextFormat global static variable in IME

Preperation for IME refactor.

Change-Id: I0832c174d05d019d69ef7c01c45aaedc6e4d9468
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
iOS: Don't store UIViewAnimationOptions value as UIViewAnimationCurve

We pull out the magic UIViewAnimationCurve of the keyboard animation
when the keyboard is about to show, but we need to defer the shifting
of the value 16 bits, as that turns it into a UIViewAnimationOptions,
which we can't store in a UIViewAnimationCurve member.

Change-Id: Id35dae1ec487951df749dfffb6118b572c28b103
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
Fix bash syntax error in configure

Fixes missing space before `]` in test condition introduced in 8d5772533887266d.

Change-Id: I741c291677f32056a0a0bec12cb4d9fd293a2021
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
QOpenGL2GradientCache::getBuffer: calculate hash value outside critical section

The code doesn't touch any member variables, so it doesn't need mutex
protection. Reducing the time spent under the mutex allows a higher
speedup (Amdahl's Law), so do it.

Also made the mutex locker const to indicate it is never unlock()ed
again.

Change-Id: Ic50b827c0e34d39cbddc7ec83675b568a9c33f6d
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>