From 10ff9d5b6f9643d3bcae519d8bf5107711d4e55d Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Tue, 17 Jun 2014 15:08:24 +0200 Subject: [PATCH 1/6] 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 Reviewed-by: Friedemann Kleint --- src/gui/opengl/qopenglframebufferobject.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gui/opengl/qopenglframebufferobject.cpp b/src/gui/opengl/qopenglframebufferobject.cpp index cd6468cccd..3102e1ecd2 100644 --- a/src/gui/opengl/qopenglframebufferobject.cpp +++ b/src/gui/opengl/qopenglframebufferobject.cpp @@ -436,6 +436,7 @@ void QOpenGLFramebufferObjectPrivate::init(QOpenGLFramebufferObject *, const QSi samples = qBound(0, int(samples), int(maxSamples)); #endif + samples = qMax(0, samples); requestedSamples = samples; size = sz; target = texture_target; From abcea1c5f06b2ea0428e08a3a71f08d39c29c2fd Mon Sep 17 00:00:00 2001 From: Gabriel de Dietrich Date: Tue, 17 Jun 2014 15:37:31 +0200 Subject: [PATCH 2/6] 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 Reviewed-by: Eskil Abrahamsen Blomfeldt --- src/3rdparty/harfbuzz-ng/src/hb-coretext.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/3rdparty/harfbuzz-ng/src/hb-coretext.cc b/src/3rdparty/harfbuzz-ng/src/hb-coretext.cc index 4fef861acc..2507cd1d9f 100644 --- a/src/3rdparty/harfbuzz-ng/src/hb-coretext.cc +++ b/src/3rdparty/harfbuzz-ng/src/hb-coretext.cc @@ -738,7 +738,8 @@ _hb_coretext_shape (hb_shape_plan_t *shape_plan, if (num_glyphs == 0) continue; - buffer->ensure (buffer->len + num_glyphs + (endWithPDF ? 1 : 0)); + const long ensureCount = DIV_CEIL(sizeof(CGGlyph) + sizeof(CGPoint) + sizeof(CFIndex), sizeof(*scratch)); + buffer->ensure (buffer->len + ensureCount * (num_glyphs + (endWithPDF ? 1 : 0))); scratch = buffer->get_scratch_buffer (&scratch_size); From 302ffa5820c05534bec9978368b3c2c1295f12a1 Mon Sep 17 00:00:00 2001 From: Konstantin Ritt Date: Wed, 18 Jun 2014 13:24:00 +0300 Subject: [PATCH 3/6] 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 --- src/gui/text/qfontengine.cpp | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/src/gui/text/qfontengine.cpp b/src/gui/text/qfontengine.cpp index 078e16574f..8adbb31a55 100644 --- a/src/gui/text/qfontengine.cpp +++ b/src/gui/text/qfontengine.cpp @@ -177,9 +177,13 @@ static const HB_FontClass hb_fontClass = { static HB_Error hb_getSFntTable(void *font, HB_Tag tableTag, HB_Byte *buffer, HB_UInt *length) { - QFontEngine *fe = (QFontEngine *)font; - Q_ASSERT(fe->faceData.get_font_table); - if (!fe->faceData.get_font_table(fe->faceData.user_data, tableTag, buffer, length)) + QFontEngine::FaceData *data = (QFontEngine::FaceData *)font; + Q_ASSERT(data); + + qt_get_font_table_func_t get_font_table = data->get_font_table; + Q_ASSERT(get_font_table); + + if (!get_font_table(data->user_data, tableTag, buffer, length)) return HB_Err_Invalid_Argument; return HB_Err_Ok; } @@ -287,8 +291,11 @@ void *QFontEngine::harfbuzzFont() const #endif if (!font_) { HB_Face hbFace = (HB_Face)harfbuzzFace(); - if (hbFace->font_for_init != 0) + if (hbFace->font_for_init) { + void *data = hbFace->font_for_init; q_check_ptr(qHBLoadFace(hbFace)); + free(data); + } HB_FontRec *hbFont = (HB_FontRec *) malloc(sizeof(HB_FontRec)); Q_CHECK_PTR(hbFont); @@ -319,7 +326,12 @@ void *QFontEngine::harfbuzzFace() const return hb_qt_face_get_for_engine(const_cast(this)); #endif if (!face_) { - HB_Face hbFace = qHBNewFace(const_cast(this), hb_getSFntTable); + QFontEngine::FaceData *data = (QFontEngine::FaceData *)malloc(sizeof(QFontEngine::FaceData)); + Q_CHECK_PTR(data); + data->user_data = faceData.user_data; + data->get_font_table = faceData.get_font_table; + + HB_Face hbFace = qHBNewFace(data, hb_getSFntTable); Q_CHECK_PTR(hbFace); hbFace->isSymbolFont = symbol; @@ -372,8 +384,11 @@ bool QFontEngine::supportsScript(QChar::Script script) const } #endif HB_Face hbFace = (HB_Face)harfbuzzFace(); - if (hbFace->font_for_init != 0) + if (hbFace->font_for_init) { + void *data = hbFace->font_for_init; q_check_ptr(qHBLoadFace(hbFace)); + free(data); + } return hbFace->supported_scripts[script_to_hbscript(script)]; } From 540ac8fd988136b5834d680a89b0aa20e9d5d131 Mon Sep 17 00:00:00 2001 From: Jani Heikkinen Date: Wed, 18 Jun 2014 12:18:01 +0300 Subject: [PATCH 4/6] Add changelog for Qt 5.3.1 Replaces https://codereview.qt-project.org/#/c/87562/ Change-Id: Id89c8b67ec47cb1d078c5325aa519daeee3cafa9 Reviewed-by: Peter Hartmann Reviewed-by: Eskil Abrahamsen Blomfeldt Reviewed-by: Jani Heikkinen --- dist/changes-5.3.1 | 62 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 dist/changes-5.3.1 diff --git a/dist/changes-5.3.1 b/dist/changes-5.3.1 new file mode 100644 index 0000000000..a9760b1d57 --- /dev/null +++ b/dist/changes-5.3.1 @@ -0,0 +1,62 @@ +Qt 5.3.1 is a bug-fix release. It maintains both forward and backward +compatibility (source and binary) with Qt 5.3.0. + +For more details, refer to the online documentation included in this +distribution. The documentation is also available online: + + http://qt-project.org/doc/qt-5.3 + +The Qt version 5.3 series is binary compatible with the 5.2.x series. +Applications compiled for 5.2 will continue to run with 5.3. + +Some of the changes listed in this file include issue tracking numbers +corresponding to tasks in the Qt Bug Tracker: + + http://bugreports.qt-project.org/ + +Each of these identifiers can be entered in the bug tracker to obtain more +information about a particular change. + +**************************************************************************** +* Library * +**************************************************************************** + +QtCore +------ + + - QAbstractProxyModel: + * Fixed QAbstractProxyModel::sibling to work in the same manner as the + Qt4 code used to behave. Previously, Qt5's implementation would treat + the row and column as positions in the source model instead of a + position in the proxy itself. + +QtGui +----- + + - Text: + * [QTBUG-36083] Respect QFont::fixedPitch() for fallbacks when font + family cannot be matched. + * [QTBUG-37190] Fixed crash when trying to load a font from invalid + data. + +QtWidgets +--------- + + - QMenu: + * [QTBUG-38498] Accessibility: Menus are now read by screen readers + with more reliability. + +**************************************************************************** +* Platform Specific Changes * +**************************************************************************** + +Android +------- + + - [QTBUG-38960] Fixed regression where there would be flickering on + startup and shutdown of the application. + - [QTBUG-35975] Fixed repaint issues in drag and drop. + + - Text: + * [QTBUG-37844] Fall back to Droid Sans Mono for QFont::Courier style + hint. From cc7ef0667c4a3d46aa5e4e13c67a75156ac60ed2 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Thu, 19 Jun 2014 13:36:37 +0200 Subject: [PATCH 5/6] add buildsystem/qmake changelog Change-Id: I7fc7d335acd4f6e98517d240cc1f9bd3d035857f Reviewed-by: Joerg Bornemann --- dist/changes-5.3.1 | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/dist/changes-5.3.1 b/dist/changes-5.3.1 index a9760b1d57..228c64086a 100644 --- a/dist/changes-5.3.1 +++ b/dist/changes-5.3.1 @@ -60,3 +60,27 @@ Android - Text: * [QTBUG-37844] Fall back to Droid Sans Mono for QFont::Courier style hint. + +**************************************************************************** +* Tools * +**************************************************************************** + +configure & build system +------------------------ + + - [QTBUG-38445] Fixed build against static ICU on Unix + - [QTBUG-38544] Fixed LLVM build with SIMD features + - [QTBUG-39253] PDB files are now installed also for static libraries + - Added support for -separate-debug-info on Windows + - Added [-no]-pulseaudio and [-no]-alsa options on Unix + - Several fixes to installed .pc and .prl files + - Fixed MinGW build under MSYS + - Fixed installation of unneeded static libraries in dynamic builds + +qmake +----- + + - [QTBUG-37054] Fixed use of relative paths in QMAKE_BUNDLE_DATA with Xcode + - [QTBUG-38260] Custom Info.plist supplied via QMAKE_INFO_PLIST is now used + as-is, without placeholder replacement + - QMAKE_TARGET_BUNDLE_PREFIX does not need a trailing dot any more From b1d99dad098320777a4391052eac531c834748fa Mon Sep 17 00:00:00 2001 From: Mark Brand Date: Mon, 23 Jun 2014 12:19:44 +0200 Subject: [PATCH 6/6] update changelog for QtSql 5.3.1 Change-Id: I06bf38a0c005ad4c13fb4db611847c3408060176 Reviewed-by: Andy Shaw --- dist/changes-5.3.1 | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/dist/changes-5.3.1 b/dist/changes-5.3.1 index 228c64086a..1e6f592a65 100644 --- a/dist/changes-5.3.1 +++ b/dist/changes-5.3.1 @@ -39,6 +39,21 @@ QtGui * [QTBUG-37190] Fixed crash when trying to load a font from invalid data. +QtSql +----- + + - QDB2 and QODBC + * [QTBUG-39137] Fix error handling problem caused by unintialized variable + passed to SQLNumResultCols. + + - QPSQL + * [QTBUG-12477] Fix PSQL column metadata. + + - QSqlQuery + * Fix misbehavior of seek in special query positions BeforeFirstRow and + AfterLastRow. (commit 3e6e70bddd84536deaae69421d05785ae6ce28cd) + * [QTBUG-33169] Fix for bindvalue(int) memory allocation problem. + QtWidgets ---------