Handle invalid sample counts gracefully in FBOs

Passing in a sample count of -1 should be treated as 0. This is common
when setting up framebuffer formats from a QSurfaceFormat where the
default, unset value is indicated by a value of -1.

This broke QQuickWidget which was unaware of this limitation of
QOpenGLFramebufferObject and was passing format.samples() as the sample
count without making sure it is 0 or higher.

Task-number: QTBUG-39699
Change-Id: I324b8b006eaa992c15ae932f9df305500fefeb65
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
harfbuzz-ng: Pre-allocate enough space for CoreText buffer

This fixes an assert in OS X 10.10 Yosemite, where the pre-
allocated buffer would be too small to hold 3 successive calls
to ALLOCATE_ARRAY.

Task-number: QTBUG-39504
Change-Id: I5a0ae36170636eb97ab21c5903b96674e2a99547
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Fix crash when reusing HB_Face in another font engine

After 717d39ac083e80, if HB_Face was instantiated by QFontEngineFT A
and then used by QFontEngineFT B, whilst A already destroyed,
a crash occurs in hb_getSFntTable() due to accessing a stale pointer.

Task-number: QTBUG-39278
Change-Id: I3428669a311f49cdda1725b778f45219cbcf470d
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Add changelog for Qt 5.3.1

Replaces https://codereview.qt-project.org/#/c/87562/
Change-Id: Id89c8b67ec47cb1d078c5325aa519daeee3cafa9
Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>