summaryrefslogtreecommitdiffstats
path: root/deps/qt5/patches
diff options
context:
space:
mode:
author Eric Hameleers <alien@slackware.com>2016-08-22 18:31:38 +0200
committer Eric Hameleers <alien@slackware.com>2016-08-22 18:31:38 +0200
commitebd87d8a49dcfd524bc745b5563e994c188cd755 (patch)
tree097bb02d4e1a53e431702ff7311dd5300b44b86e /deps/qt5/patches
parent6dce8be4bf0af44260b77fef4d1ba635c620bc8c (diff)
downloadktown-ebd87d8a49dcfd524bc745b5563e994c188cd755.tar.gz
ktown-ebd87d8a49dcfd524bc745b5563e994c188cd755.tar.xz
deps: Qt5 updated to 5.7.0 and rebuilt packages depending on it.
Updated: - qt5 Rebuilt against new qt5: - qt5-webkit - PyQt5 - sni-qt - qca-qt5 - qt-gstreamer - phonon - libdbusmenu-qt5 - polkit-qt5-1 - grantlee Original Slackware package rebuilt (to add Qt5 support): - poppler
Diffstat (limited to 'deps/qt5/patches')
-rw-r--r--deps/qt5/patches/qt5.qtbug-49452.patch58
-rw-r--r--deps/qt5/patches/qt5.qtbug-53237.patch90
2 files changed, 148 insertions, 0 deletions
diff --git a/deps/qt5/patches/qt5.qtbug-49452.patch b/deps/qt5/patches/qt5.qtbug-49452.patch
new file mode 100644
index 0000000..4549ff1
--- /dev/null
+++ b/deps/qt5/patches/qt5.qtbug-49452.patch
@@ -0,0 +1,58 @@
+From 6f423555eba55ccdf7287071e10576bc1b687fd2 Mon Sep 17 00:00:00 2001
+From: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
+Date: Mon, 1 Aug 2016 13:39:53 +0200
+Subject: [PATCH] REG: Fix unwanted cache flush in Freetype engine
+
+The Freetype cache was almost completely disabled by
+134c6db8587a8ce156d4fa31ffa62605821851b2 because after that
+change, the lockedAlphaMapForGlyph() function would no longer
+cut off early for empty glyphs like spaces, but rather go
+through all alpha map functions before it realized that there
+was nothing to render. This would in turn invalidate the cache
+for every empty glyph, causing all glyphs to be rerendered for
+every isolated word.
+
+This change adds back a cut off. This is only needed in the
+lockedAlphaMapForGlyph() function, since the superclass implementation
+of the other alpha map functions already contains a cut off for
+width/height == 0.
+
+[ChangeLog][Qt Gui][Text] Fixed a performance regression in Freetype
+engine that was introduced in Qt 5.5.
+
+Change-Id: I381285939909e99cc5fb5f3497fecf9fa871f29a
+Task-number: QTBUG-49452
+Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
+---
+ src/gui/text/qfontengine_ft.cpp | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/src/gui/text/qfontengine_ft.cpp b/src/gui/text/qfontengine_ft.cpp
+index 4de41df..7c878da 100644
+--- a/src/gui/text/qfontengine_ft.cpp
++++ b/src/gui/text/qfontengine_ft.cpp
+@@ -1716,7 +1716,7 @@ glyph_metrics_t QFontEngineFT::alphaMapBoundingBox(glyph_t glyph, QFixed subPixe
+
+ static inline QImage alphaMapFromGlyphData(QFontEngineFT::Glyph *glyph, QFontEngine::GlyphFormat glyphFormat)
+ {
+- if (glyph == Q_NULLPTR)
++ if (glyph == Q_NULLPTR || glyph->height == 0 || glyph->width == 0)
+ return QImage();
+
+ QImage::Format format = QImage::Format_Invalid;
+@@ -1764,11 +1764,15 @@ QImage *QFontEngineFT::lockedAlphaMapForGlyph(glyph_t glyphIndex, QFixed subPixe
+
+ currentlyLockedAlphaMap = alphaMapFromGlyphData(glyph, neededFormat);
+
++ const bool glyphHasGeometry = glyph != Q_NULLPTR && glyph->height != 0 && glyph->width != 0;
+ if (!cacheEnabled && glyph != &emptyGlyph) {
+ currentlyLockedAlphaMap = currentlyLockedAlphaMap.copy();
+ delete glyph;
+ }
+
++ if (!glyphHasGeometry)
++ return Q_NULLPTR;
++
+ if (currentlyLockedAlphaMap.isNull())
+ return QFontEngine::lockedAlphaMapForGlyph(glyphIndex, subPixelPosition, neededFormat, t, offset);
+
diff --git a/deps/qt5/patches/qt5.qtbug-53237.patch b/deps/qt5/patches/qt5.qtbug-53237.patch
new file mode 100644
index 0000000..c6d5739
--- /dev/null
+++ b/deps/qt5/patches/qt5.qtbug-53237.patch
@@ -0,0 +1,90 @@
+From 8e889378115c69508b050a511621ac8e30ec4158 Mon Sep 17 00:00:00 2001
+From: Jesus Fernandez <jesus.fernandez@theqtcompany.com>
+Date: Mon, 13 Jun 2016 19:09:15 +0200
+Subject: [PATCH] Fix UNSIGNED values in QMYSQL
+
+The unsigned flag in columns was ignored when creating the list of
+bound values in a mysql table. So the result iteration with
+QSqlQuery::next stops after the first wrong truncated value.
+
+[ChangeLog][QtSql] Fixed QSqlQuery::prepare value truncation error when
+using UNSIGNED values in a MySQL database.
+
+Task-number: QTBUG-53969
+Task-number: QTBUG-53237
+Change-Id: I10d977993445f2794f1dd8c88b2e83517ef524f3
+Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
+---
+ src/sql/drivers/mysql/qsql_mysql.cpp | 1 +
+ tests/auto/sql/kernel/qsqlquery/tst_qsqlquery.cpp | 39 +++++++++++++++++++++++
+ 2 files changed, 40 insertions(+)
+
+diff --git a/src/sql/drivers/mysql/qsql_mysql.cpp b/src/sql/drivers/mysql/qsql_mysql.cpp
+index 96bdcc4..55bf499 100644
+--- a/src/sql/drivers/mysql/qsql_mysql.cpp
++++ b/src/sql/drivers/mysql/qsql_mysql.cpp
+@@ -387,6 +387,7 @@ bool QMYSQLResultPrivate::bindInValues()
+ bind->buffer_length = f.bufLength = fieldInfo->length + 1;
+ bind->is_null = &f.nullIndicator;
+ bind->length = &f.bufLength;
++ bind->is_unsigned = fieldInfo->flags & UNSIGNED_FLAG ? 1 : 0;
+ f.outField=field;
+
+ ++i;
+diff --git a/tests/auto/sql/kernel/qsqlquery/tst_qsqlquery.cpp b/tests/auto/sql/kernel/qsqlquery/tst_qsqlquery.cpp
+index bd553d5..f1c4333 100644
+--- a/tests/auto/sql/kernel/qsqlquery/tst_qsqlquery.cpp
++++ b/tests/auto/sql/kernel/qsqlquery/tst_qsqlquery.cpp
+@@ -233,6 +233,9 @@ private slots:
+ void QTBUG_36211_data() { generic_data("QPSQL"); }
+ void QTBUG_36211();
+
++ void QTBUG_53969_data() { generic_data("QMYSQL"); }
++ void QTBUG_53969();
++
+ void sqlite_constraint_data() { generic_data("QSQLITE"); }
+ void sqlite_constraint();
+
+@@ -3652,6 +3655,42 @@ void tst_QSqlQuery::QTBUG_36211()
+ }
+ }
+
++void tst_QSqlQuery::QTBUG_53969()
++{
++ QFETCH( QString, dbName );
++ QVector<int> values = QVector<int>() << 10 << 20 << 127 << 128 << 1, tableValues;
++ QSqlDatabase db = QSqlDatabase::database( dbName );
++ CHECK_DATABASE( db );
++ tableValues.reserve(values.size());
++ if (tst_Databases::getDatabaseType(db) == QSqlDriver::MySqlServer) {
++ const QString tableName(qTableName("bug53969", __FILE__, db));
++ tst_Databases::safeDropTable( db, tableName );
++
++ QSqlQuery q(db);
++ QVERIFY_SQL(q, exec(QString("CREATE TABLE %1 (id INT AUTO_INCREMENT PRIMARY KEY, "
++ "test_number TINYINT(3) UNSIGNED)")
++ .arg(tableName)));
++
++ QVERIFY_SQL(q, prepare("INSERT INTO " + tableName + " (test_number) VALUES (:value)"));
++
++ QVector<int>::iterator begin = values.begin(), end = values.end(), it;
++ for (it = begin; it != end; ++it) {
++ q.bindValue(":value", *it);
++ QVERIFY_SQL(q, exec());
++ }
++
++ QVERIFY_SQL(q, prepare("SELECT test_number FROM " + tableName));
++ QVERIFY_SQL(q, exec());
++
++ while (q.next()) {
++ bool ok;
++ tableValues.push_back(q.value(0).toUInt(&ok));
++ QVERIFY(ok);
++ }
++ QCOMPARE(values, tableValues);
++ }
++}
++
+ void tst_QSqlQuery::oraOCINumber()
+ {
+ QFETCH( QString, dbName );