[packages/qt4] - up to 4.8.7; bunch of SECURITY fixes
arekm
arekm at pld-linux.org
Tue May 26 13:55:14 CEST 2015
commit 7f5d077c3780bc4c6f65bf09831d2f030eab5846
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date: Tue May 26 13:55:05 2015 +0200
- up to 4.8.7; bunch of SECURITY fixes
0010-QDbus-Fix-a-b-comparison.patch | 31 --
0023-Don-t-crash-on-broken-GIF-images.patch | 43 ---
...index-lookup-in-QTreeViewPrivate-adjustVi.patch | 43 ---
...ry-and-file-descriptor-leak-in-QFontCache.patch | 379 ---------------------
0034-Fix-raster-graphics-on-X11-RGB30.patch | 33 --
...r-drawPolyline-painting-errors-with-cosme.patch | 44 ---
...che-check-in-QFontEngineFT-recalcAdvances.patch | 41 ---
qt4.spec | 22 +-
8 files changed, 5 insertions(+), 631 deletions(-)
---
diff --git a/qt4.spec b/qt4.spec
index 349a216..afe4d51 100644
--- a/qt4.spec
+++ b/qt4.spec
@@ -59,12 +59,12 @@ Summary(es.UTF-8): Biblioteca para ejecutar aplicaciones GUI Qt
Summary(pl.UTF-8): Biblioteka Qt do tworzenia GUI
Summary(pt_BR.UTF-8): Estrutura para rodar aplicações GUI Qt
Name: qt4
-Version: 4.8.6
-Release: 12
+Version: 4.8.7
+Release: 1
License: LGPL v2.1 or GPL v3.0
Group: X11/Libraries
Source0: http://download.qt-project.org/official_releases/qt/4.8/%{version}/qt-everywhere-opensource-src-%{version}.tar.gz
-# Source0-md5: 2edbe4d6c2eff33ef91732602f3518eb
+# Source0-md5: d990ee66bf7ab0c785589776f35ba6ad
Source2: %{name}-qtconfig.desktop
Source3: %{name}-designer.desktop
Source4: %{name}-assistant.desktop
@@ -97,13 +97,7 @@ Patch16: qt-everywhere-opensource-src-4.8.3-QTBUG-4862.patch
Patch17: l-qclipboard_delay.patch
Patch18: l-qclipboard_fix_recursive.patch
Patch19: qtcore-4.8.5-honor-ExcludeSocketNotifiers-in-glib-event-loop.patch
-Patch20: 0010-QDbus-Fix-a-b-comparison.patch
-Patch21: 0023-Don-t-crash-on-broken-GIF-images.patch
-Patch22: 0025-Fix-visual-index-lookup-in-QTreeViewPrivate-adjustVi.patch
-Patch23: 0030-Memory-and-file-descriptor-leak-in-QFontCache.patch
-Patch24: 0034-Fix-raster-graphics-on-X11-RGB30.patch
-Patch25: 0065-Fix-QPainter-drawPolyline-painting-errors-with-cosme.patch
-Patch26: 0072-Fix-font-cache-check-in-QFontEngineFT-recalcAdvances.patch
+
Patch27: moc-boost-workaround.patch
URL: http://qt-project.org/
%{?with_ibase:BuildRequires: Firebird-devel}
@@ -1500,13 +1494,7 @@ Programas exemplo para o Qt versão.
%patch17 -p0
%patch18 -p0
%patch19 -p1
-%patch20 -p1
-%patch21 -p1
-%patch22 -p1
-%patch23 -p1
-%patch24 -p1
-%patch25 -p1
-%patch26 -p1
+
%patch27 -p1
%{__sed} -i -e 's,usr/X11R6/,usr/g,' mkspecs/linux-g++-64/qmake.conf \
diff --git a/0010-QDbus-Fix-a-b-comparison.patch b/0010-QDbus-Fix-a-b-comparison.patch
deleted file mode 100644
index 0909ae0..0000000
--- a/0010-QDbus-Fix-a-b-comparison.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From d0b790dcd02da959cbdfc83d606906cead9e8375 Mon Sep 17 00:00:00 2001
-From: David Faure <david.faure at kdab.com>
-Date: Sat, 12 Apr 2014 11:25:28 +0200
-Subject: [PATCH 10/37] QDbus: Fix (!a == b) comparison
-
-! binds to a, and that is wrong here.
-
-(cherry picked from qtbase/4b7cd57719a637189696d673b014ae785df669bf)
-
-Change-Id: I75542a0c27f39fb6e684dedd9925a1f3748d4919
-Reviewed-by: Thiago Macieira <thiago.macieira at intel.com>
----
- src/dbus/qdbuspendingcall.cpp | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/dbus/qdbuspendingcall.cpp b/src/dbus/qdbuspendingcall.cpp
-index 06597a6..b7def2e 100644
---- a/src/dbus/qdbuspendingcall.cpp
-+++ b/src/dbus/qdbuspendingcall.cpp
-@@ -225,7 +225,7 @@ void QDBusPendingCallPrivate::checkReceivedSignature()
- return; // no signature to validate against
-
- // can't use startsWith here because a null string doesn't start or end with an empty string
-- if (!replyMessage.signature().indexOf(expectedReplySignature) == 0) {
-+ if (replyMessage.signature().indexOf(expectedReplySignature) != 0) {
- QString errorMsg = QLatin1String("Unexpected reply signature: got \"%1\", "
- "expected \"%2\"");
- replyMessage = QDBusMessage::createError(
---
-1.9.3
-
diff --git a/0023-Don-t-crash-on-broken-GIF-images.patch b/0023-Don-t-crash-on-broken-GIF-images.patch
deleted file mode 100644
index 0471e0b..0000000
--- a/0023-Don-t-crash-on-broken-GIF-images.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-From f1b76c126c476c155af8c404b97c42cd1a709333 Mon Sep 17 00:00:00 2001
-From: Lars Knoll <lars.knoll at digia.com>
-Date: Thu, 24 Apr 2014 15:33:27 +0200
-Subject: [PATCH 23/74] Don't crash on broken GIF images
-
-Broken GIF images could set invalid width and height
-values inside the image, leading to Qt creating a null
-QImage for it. In that case we need to abort decoding
-the image and return an error.
-
-Initial patch by Rich Moore.
-
-Backport of Id82a4036f478bd6e49c402d6598f57e7e5bb5e1e from Qt 5
-
-Task-number: QTBUG-38367
-Change-Id: I0680740018aaa8356d267b7af3f01fac3697312a
-Security-advisory: CVE-2014-0190
-Reviewed-by: Richard J. Moore <rich at kde.org>
----
- src/gui/image/qgifhandler.cpp | 7 +++++++
- 1 file changed, 7 insertions(+)
-
-diff --git a/src/gui/image/qgifhandler.cpp b/src/gui/image/qgifhandler.cpp
-index 3324f04..5199dd3 100644
---- a/src/gui/image/qgifhandler.cpp
-+++ b/src/gui/image/qgifhandler.cpp
-@@ -359,6 +359,13 @@ int QGIFFormat::decode(QImage *image, const uchar *buffer, int length,
- memset(bits, 0, image->byteCount());
- }
-
-+ // Check if the previous attempt to create the image failed. If it
-+ // did then the image is broken and we should give up.
-+ if (image->isNull()) {
-+ state = Error;
-+ return -1;
-+ }
-+
- disposePrevious(image);
- disposed = false;
-
---
-1.9.3
-
diff --git a/0025-Fix-visual-index-lookup-in-QTreeViewPrivate-adjustVi.patch b/0025-Fix-visual-index-lookup-in-QTreeViewPrivate-adjustVi.patch
deleted file mode 100644
index 46af0d0..0000000
--- a/0025-Fix-visual-index-lookup-in-QTreeViewPrivate-adjustVi.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-From 6d76e943dab0971d376cebb15fe531efc60622ac Mon Sep 17 00:00:00 2001
-From: Friedemann Kleint <Friedemann.Kleint at digia.com>
-Date: Mon, 5 May 2014 10:59:56 +0200
-Subject: [PATCH 25/37] Fix visual index lookup in
- QTreeViewPrivate::adjustViewOptionsForIndex().
-
-Determine the visual index by looking up the column of the QModelIndex
-in the logicalIndices array instead of looping.
-
-Task-number: QTBUG-37813
-Change-Id: I5c3c73c67537877b03cdc2c36a52041d99f7f49d
-Reviewed-by: David Faure <david.faure at kdab.com>
-(cherry picked from qtbase/85aef2dd4b059d2ba9cba4605d9fef87f3e2c4fc)
----
- src/gui/itemviews/qtreeview.cpp | 11 ++---------
- tests/auto/qtreeview/tst_qtreeview.cpp | 27 +++++++++++++++++++++++++++
- 2 files changed, 29 insertions(+), 9 deletions(-)
-
-diff --git a/src/gui/itemviews/qtreeview.cpp b/src/gui/itemviews/qtreeview.cpp
-index f506f48..fdf020e 100644
---- a/src/gui/itemviews/qtreeview.cpp
-+++ b/src/gui/itemviews/qtreeview.cpp
-@@ -1367,15 +1367,8 @@ void QTreeViewPrivate::adjustViewOptionsForIndex(QStyleOptionViewItemV4 *option,
- const int right = (spanning ? header->visualIndex(0) : header->count() - 1 );
- calcLogicalIndices(&logicalIndices, &viewItemPosList, left, right);
-
-- int columnIndex = 0;
-- for (int visualIndex = 0; visualIndex < current.column(); ++visualIndex) {
-- int logicalIndex = header->logicalIndex(visualIndex);
-- if (!header->isSectionHidden(logicalIndex)) {
-- ++columnIndex;
-- }
-- }
--
-- option->viewItemPosition = viewItemPosList.at(columnIndex);
-+ const int visualIndex = logicalIndices.indexOf(current.column());
-+ option->viewItemPosition = viewItemPosList.at(visualIndex);
- }
-
-
---
-1.9.3
-
diff --git a/0030-Memory-and-file-descriptor-leak-in-QFontCache.patch b/0030-Memory-and-file-descriptor-leak-in-QFontCache.patch
deleted file mode 100644
index f6aea91..0000000
--- a/0030-Memory-and-file-descriptor-leak-in-QFontCache.patch
+++ /dev/null
@@ -1,379 +0,0 @@
-From 45693cc638d10890f2816a38d38de6ddaf04ffd3 Mon Sep 17 00:00:00 2001
-From: Simon Yuan <simon.yuan at navico.com>
-Date: Wed, 2 Apr 2014 16:02:04 +1300
-Subject: [PATCH 30/74] Memory and file descriptor leak in QFontCache
-
-Make the cache also use the ref counts
-Make everyone who decrements a ref count check for 0 and delete
-Move all cache logic to the cache
-Same idea as 36cb3f3 and b3dae68 in Qt 5 without the extra stuff
-
-Task-number: QTBUG-38035
-Change-Id: I27bea376f4ec0888463b4ec3ed1a6bef00d041f8
-Reviewed-by: Konstantin Ritt <ritt.ks at gmail.com>
-Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt at digia.com>
----
- src/gui/text/qfont.cpp | 102 +++++++++++++++++-------------------------
- src/gui/text/qfontengine.cpp | 7 +--
- src/gui/text/qrawfont.cpp | 13 +++---
- src/gui/text/qrawfont_win.cpp | 4 +-
- src/gui/text/qstatictext.cpp | 6 +--
- src/gui/text/qtextengine.cpp | 7 +--
- 6 files changed, 55 insertions(+), 84 deletions(-)
-
-diff --git a/src/gui/text/qfont.cpp b/src/gui/text/qfont.cpp
-index 7e94c1e..fa9bb70 100644
---- a/src/gui/text/qfont.cpp
-+++ b/src/gui/text/qfont.cpp
-@@ -275,8 +275,8 @@ QFontPrivate::QFontPrivate(const QFontPrivate &other)
-
- QFontPrivate::~QFontPrivate()
- {
-- if (engineData)
-- engineData->ref.deref();
-+ if (engineData && !engineData->ref.deref())
-+ delete engineData;
- engineData = 0;
- if (scFont && scFont != this)
- scFont->ref.deref();
-@@ -298,7 +298,8 @@ QFontEngine *QFontPrivate::engineForScript(int script) const
- script = QUnicodeTables::Common;
- if (engineData && engineData->fontCache != QFontCache::instance()) {
- // throw out engineData that came from a different thread
-- engineData->ref.deref();
-+ if (!engineData->ref.deref())
-+ delete engineData;
- engineData = 0;
- }
- if (!engineData || !QT_FONT_ENGINE_FROM_DATA(engineData, script))
-@@ -417,13 +418,13 @@ QFontEngineData::~QFontEngineData()
- {
- #if !defined(Q_WS_MAC)
- for (int i = 0; i < QUnicodeTables::ScriptCount; ++i) {
-- if (engines[i])
-- engines[i]->ref.deref();
-+ if (engines[i] && !engines[i]->ref.deref())
-+ delete engines[i];
- engines[i] = 0;
- }
- #else
-- if (engine)
-- engine->ref.deref();
-+ if (engine && !engine->ref.deref())
-+ delete engine;
- engine = 0;
- #endif // Q_WS_X11 || Q_WS_WIN || Q_WS_MAC
- }
-@@ -770,8 +771,8 @@ QFont::QFont(QFontPrivate *data)
- void QFont::detach()
- {
- if (d->ref == 1) {
-- if (d->engineData)
-- d->engineData->ref.deref();
-+ if (d->engineData && !d->engineData->ref.deref())
-+ delete d->engineData;
- d->engineData = 0;
- if (d->scFont && d->scFont != d.data())
- d->scFont->ref.deref();
-@@ -2819,7 +2820,7 @@ QFontCache::~QFontCache()
- EngineDataCache::ConstIterator it = engineDataCache.constBegin(),
- end = engineDataCache.constEnd();
- while (it != end) {
-- if (it.value()->ref == 0)
-+ if (it.value()->ref.deref() == 0)
- delete it.value();
- else
- FC_DEBUG("QFontCache::~QFontCache: engineData %p still has refcount %d",
-@@ -2827,24 +2828,6 @@ QFontCache::~QFontCache()
- ++it;
- }
- }
-- EngineCache::ConstIterator it = engineCache.constBegin(),
-- end = engineCache.constEnd();
-- while (it != end) {
-- if (--it.value().data->cache_count == 0) {
-- if (it.value().data->ref == 0) {
-- FC_DEBUG("QFontCache::~QFontCache: deleting engine %p key=(%d / %g %g %d %d %d)",
-- it.value().data, it.key().script, it.key().def.pointSize,
-- it.key().def.pixelSize, it.key().def.weight, it.key().def.style,
-- it.key().def.fixedPitch);
--
-- delete it.value().data;
-- } else {
-- FC_DEBUG("QFontCache::~QFontCache: engine = %p still has refcount %d",
-- it.value().data, int(it.value().data->ref));
-- }
-- }
-- ++it;
-- }
- }
-
- void QFontCache::clear()
-@@ -2856,16 +2839,14 @@ void QFontCache::clear()
- QFontEngineData *data = it.value();
- #if !defined(Q_WS_MAC)
- for (int i = 0; i < QUnicodeTables::ScriptCount; ++i) {
-- if (data->engines[i]) {
-- data->engines[i]->ref.deref();
-- data->engines[i] = 0;
-- }
-+ if (data->engines[i] && !data->engines[i]->ref.deref())
-+ delete data->engines[i];
-+ data->engines[i] = 0;
- }
- #else
-- if (data->engine) {
-- data->engine->ref.deref();
-- data->engine = 0;
-- }
-+ if (data->engine && !data->engine->ref.deref())
-+ delete data->engine;
-+ data->engine = 0;
- #endif
- ++it;
- }
-@@ -2873,15 +2854,7 @@ void QFontCache::clear()
-
- for (EngineCache::Iterator it = engineCache.begin(), end = engineCache.end();
- it != end; ++it) {
-- if (it->data->ref == 0) {
-- delete it->data;
-- it->data = 0;
-- }
-- }
--
-- for (EngineCache::Iterator it = engineCache.begin(), end = engineCache.end();
-- it != end; ++it) {
-- if (it->data && it->data->ref == 0) {
-+ if (it->data->ref.deref() == 0) {
- delete it->data;
- it->data = 0;
- }
-@@ -2916,6 +2889,8 @@ void QFontCache::insertEngineData(const Key &key, QFontEngineData *engineData)
- {
- FC_DEBUG("QFontCache: inserting new engine data %p", engineData);
-
-+ Q_ASSERT(!engineDataCache.contains(key));
-+ engineData->ref.ref(); // the cache has a reference
- engineDataCache.insert(key, engineData);
- increaseCost(sizeof(QFontEngineData));
- }
-@@ -2946,6 +2921,11 @@ void QFontCache::insertEngine(const Key &key, QFontEngine *engine)
- Engine data(engine);
- data.timestamp = ++current_timestamp;
-
-+ QFontEngine *oldEngine = engineCache.value(key).data;
-+ engine->ref.ref(); // the cache has a reference
-+ if (oldEngine && !oldEngine->ref.deref())
-+ delete oldEngine;
-+
- engineCache.insert(key, data);
-
- // only increase the cost if this is the first time we insert the engine
-@@ -3005,12 +2985,11 @@ void QFontCache::cleanupPrinterFonts()
- continue;
- }
-
-- if(it.value()->ref != 0) {
-- for(int i = 0; i < QUnicodeTables::ScriptCount; ++i) {
-- if(it.value()->engines[i]) {
-- it.value()->engines[i]->ref.deref();
-- it.value()->engines[i] = 0;
-- }
-+ if (it.value()->ref > 1) {
-+ for (int i = 0; i < QUnicodeTables::ScriptCount; ++i) {
-+ if (it.value()->engines[i] && !it.value()->engines[i]->ref.deref())
-+ delete it.value()->engines[i];
-+ it.value()->engines[i] = 0;
- }
- ++it;
- } else {
-@@ -3021,7 +3000,8 @@ void QFontCache::cleanupPrinterFonts()
-
- FC_DEBUG(" %p", rem.value());
-
-- delete rem.value();
-+ if (!rem.value()->ref.deref())
-+ delete rem.value();
- engineDataCache.erase(rem);
- }
- }
-@@ -3030,7 +3010,7 @@ void QFontCache::cleanupPrinterFonts()
- EngineCache::Iterator it = engineCache.begin(),
- end = engineCache.end();
- while(it != end) {
-- if (it.value().data->ref != 0 || it.key().screen == 0) {
-+ if (it.value().data->ref != 1 || it.key().screen == 0) {
- ++it;
- continue;
- }
-@@ -3044,7 +3024,8 @@ void QFontCache::cleanupPrinterFonts()
- FC_DEBUG(" DELETE: last occurrence in cache");
-
- decreaseCost(it.value().data->cache_cost);
-- delete it.value().data;
-+ if (!it.value().data->ref.deref())
-+ delete it.value().data;
- }
-
- engineCache.erase(it++);
-@@ -3093,7 +3074,7 @@ void QFontCache::timerEvent(QTimerEvent *)
- # endif // Q_WS_X11 || Q_WS_WIN
- #endif // QFONTCACHE_DEBUG
-
-- if (it.value()->ref != 0)
-+ if (it.value()->ref > 1)
- in_use_cost += engine_data_cost;
- }
- }
-@@ -3109,7 +3090,7 @@ void QFontCache::timerEvent(QTimerEvent *)
- int(it.value().data->ref), it.value().data->cache_count,
- it.value().data->cache_cost);
-
-- if (it.value().data->ref != 0)
-+ if (it.value().data->ref > 1)
- in_use_cost += it.value().data->cache_cost / it.value().data->cache_count;
- }
-
-@@ -3159,7 +3140,7 @@ void QFontCache::timerEvent(QTimerEvent *)
- EngineDataCache::Iterator it = engineDataCache.begin(),
- end = engineDataCache.end();
- while (it != end) {
-- if (it.value()->ref != 0) {
-+ if (it.value()->ref > 1) {
- ++it;
- continue;
- }
-@@ -3187,7 +3168,7 @@ void QFontCache::timerEvent(QTimerEvent *)
- uint least_popular = ~0u;
-
- for (; it != end; ++it) {
-- if (it.value().data->ref != 0)
-+ if (it.value().data->ref > 1)
- continue;
-
- if (it.value().timestamp < oldest &&
-@@ -3200,7 +3181,7 @@ void QFontCache::timerEvent(QTimerEvent *)
- FC_DEBUG(" oldest %u least popular %u", oldest, least_popular);
-
- for (it = engineCache.begin(); it != end; ++it) {
-- if (it.value().data->ref == 0 &&
-+ if (it.value().data->ref == 1 &&
- it.value().timestamp == oldest &&
- it.value().hits == least_popular)
- break;
-@@ -3216,7 +3197,8 @@ void QFontCache::timerEvent(QTimerEvent *)
- FC_DEBUG(" DELETE: last occurrence in cache");
-
- decreaseCost(it.value().data->cache_cost);
-- delete it.value().data;
-+ if (!it.value().data->ref.deref())
-+ delete it.value().data;
- } else {
- /*
- this particular font engine is in the cache multiple
-diff --git a/src/gui/text/qfontengine.cpp b/src/gui/text/qfontengine.cpp
-index 9de475c..bf108c4 100644
---- a/src/gui/text/qfontengine.cpp
-+++ b/src/gui/text/qfontengine.cpp
-@@ -1325,11 +1325,8 @@ QFontEngineMulti::~QFontEngineMulti()
- {
- for (int i = 0; i < engines.size(); ++i) {
- QFontEngine *fontEngine = engines.at(i);
-- if (fontEngine) {
-- fontEngine->ref.deref();
-- if (fontEngine->cache_count == 0 && fontEngine->ref == 0)
-- delete fontEngine;
-- }
-+ if (fontEngine && !fontEngine->ref.deref())
-+ delete fontEngine;
- }
- }
-
-diff --git a/src/gui/text/qrawfont.cpp b/src/gui/text/qrawfont.cpp
-index 2b7554a..cb2bcb3 100644
---- a/src/gui/text/qrawfont.cpp
-+++ b/src/gui/text/qrawfont.cpp
-@@ -682,8 +682,7 @@ void QRawFont::setPixelSize(qreal pixelSize)
- if (d->fontEngine != 0)
- d->fontEngine->ref.ref();
-
-- oldFontEngine->ref.deref();
-- if (oldFontEngine->cache_count == 0 && oldFontEngine->ref == 0)
-+ if (!oldFontEngine->ref.deref())
- delete oldFontEngine;
- }
-
-@@ -693,12 +692,10 @@ void QRawFont::setPixelSize(qreal pixelSize)
- void QRawFontPrivate::cleanUp()
- {
- platformCleanUp();
-- if (fontEngine != 0) {
-- fontEngine->ref.deref();
-- if (fontEngine->cache_count == 0 && fontEngine->ref == 0)
-- delete fontEngine;
-- fontEngine = 0;
-- }
-+ if (fontEngine != 0 && !fontEngine->ref.deref())
-+ delete fontEngine;
-+ fontEngine = 0;
-+
- hintingPreference = QFont::PreferDefaultHinting;
- }
-
-diff --git a/src/gui/text/qrawfont_win.cpp b/src/gui/text/qrawfont_win.cpp
-index 6923aae..9b66886 100644
---- a/src/gui/text/qrawfont_win.cpp
-+++ b/src/gui/text/qrawfont_win.cpp
-@@ -600,11 +600,11 @@ void QRawFontPrivate::platformLoadFromData(const QByteArray &fontData,
- if (request.family != fontEngine->fontDef.family) {
- qWarning("QRawFont::platformLoadFromData: Failed to load font. "
- "Got fallback instead: %s", qPrintable(fontEngine->fontDef.family));
-- if (fontEngine->cache_count == 0 && fontEngine->ref == 0)
-+ if (fontEngine->ref == 0)
- delete fontEngine;
- fontEngine = 0;
- } else {
-- Q_ASSERT(fontEngine->cache_count == 0 && fontEngine->ref == 0);
-+ Q_ASSERT(fontEngine->ref == 0);
-
- // Override the generated font name
- static_cast<QFontEngineWin *>(fontEngine)->uniqueFamilyName = uniqueFamilyName;
-diff --git a/src/gui/text/qstatictext.cpp b/src/gui/text/qstatictext.cpp
-index 657da33..b111200 100644
---- a/src/gui/text/qstatictext.cpp
-+++ b/src/gui/text/qstatictext.cpp
-@@ -724,10 +724,8 @@ QStaticTextItem::~QStaticTextItem()
-
- void QStaticTextItem::setFontEngine(QFontEngine *fe)
- {
-- if (m_fontEngine != 0) {
-- if (!m_fontEngine->ref.deref())
-- delete m_fontEngine;
-- }
-+ if (m_fontEngine != 0 && !m_fontEngine->ref.deref())
-+ delete m_fontEngine;
-
- m_fontEngine = fe;
- if (m_fontEngine != 0)
-diff --git a/src/gui/text/qtextengine.cpp b/src/gui/text/qtextengine.cpp
-index b371237..f4b86b0 100644
---- a/src/gui/text/qtextengine.cpp
-+++ b/src/gui/text/qtextengine.cpp
-@@ -1453,11 +1453,8 @@ void QTextEngine::shape(int item) const
-
- static inline void releaseCachedFontEngine(QFontEngine *fontEngine)
- {
-- if (fontEngine) {
-- fontEngine->ref.deref();
-- if (fontEngine->cache_count == 0 && fontEngine->ref == 0)
-- delete fontEngine;
-- }
-+ if (fontEngine && !fontEngine->ref.deref())
-+ delete fontEngine;
- }
-
- void QTextEngine::resetFontEngineCache()
---
-1.9.3
-
diff --git a/0034-Fix-raster-graphics-on-X11-RGB30.patch b/0034-Fix-raster-graphics-on-X11-RGB30.patch
deleted file mode 100644
index e26d9f2..0000000
--- a/0034-Fix-raster-graphics-on-X11-RGB30.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From 01f42466d37dbbdedd0c2386f2b83c3bc7c3873b Mon Sep 17 00:00:00 2001
-From: Allan Sandfeld Jensen <allan.jensen at digia.com>
-Date: Mon, 26 May 2014 09:25:42 +0200
-Subject: [PATCH 34/37] Fix raster graphics on X11 RGB30
-
-The window surface incorrectly assumes that any pixel depth of 24 or
-above would be on 8bit/color. This breaks 10bit/color formats like
-RGB30. This patch instead make it specifically check for color depth 24
-or 32 which are the two with 8bit/color.
-
-Task-number: QTBUG-25998
-Change-Id: Id0b7e07bdb64679f8c647158938da12efede9142
-Reviewed-by: Gunnar Sletta <gunnar.sletta at jollamobile.com>
----
- src/gui/painting/qwindowsurface_raster.cpp | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/gui/painting/qwindowsurface_raster.cpp b/src/gui/painting/qwindowsurface_raster.cpp
-index ae5a591..1f2b3fe 100644
---- a/src/gui/painting/qwindowsurface_raster.cpp
-+++ b/src/gui/painting/qwindowsurface_raster.cpp
-@@ -256,7 +256,7 @@ void QRasterWindowSurface::flush(QWidget *widget, const QRegion &rgn, const QPoi
- {
- int depth = widget->x11Info().depth();
- const QImage &src = d->image->image;
-- if (src.format() != QImage::Format_RGB32 || depth < 24 || X11->bppForDepth.value(depth) != 32) {
-+ if (src.format() != QImage::Format_RGB32 || (depth != 24 && depth != 32) || X11->bppForDepth.value(depth) != 32) {
- Q_ASSERT(src.depth() >= 16);
- const QImage sub_src(src.scanLine(br.y()) + br.x() * (uint(src.depth()) / 8),
- br.width(), br.height(), src.bytesPerLine(), src.format());
---
-1.9.3
-
diff --git a/0065-Fix-QPainter-drawPolyline-painting-errors-with-cosme.patch b/0065-Fix-QPainter-drawPolyline-painting-errors-with-cosme.patch
deleted file mode 100644
index 338064f..0000000
--- a/0065-Fix-QPainter-drawPolyline-painting-errors-with-cosme.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-From 6c3b032693acf86a894a8ea3a30c937a1d08ed7f Mon Sep 17 00:00:00 2001
-From: aavit <eirik.aavitsland at digia.com>
-Date: Tue, 12 Aug 2014 13:54:17 +0200
-Subject: [PATCH 65/74] Fix QPainter::drawPolyline() painting errors with
- cosmetic pen
-
-Task-number: QTBUG-31579
-Change-Id: I8fd2c03ff9a22e4963bfcbcfe196ae4c61b9e10f
-Reviewed-by: Gunnar Sletta <gunnar.sletta at jollamobile.com>
-(cherry picked from qtbase/319cbb7597100f3b65792dc6a0ce2885ce6c0e8c)
-Reviewed-by: Gunnar Sletta <gunnar at sletta.org>
----
- src/gui/painting/qcosmeticstroker.cpp | 8 ++++----
- 1 file changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/src/gui/painting/qcosmeticstroker.cpp b/src/gui/painting/qcosmeticstroker.cpp
-index 5ca652e..1255a3b 100644
---- a/src/gui/painting/qcosmeticstroker.cpp
-+++ b/src/gui/painting/qcosmeticstroker.cpp
-@@ -533,8 +533,8 @@ void QCosmeticStroker::drawPath(const QVectorPath &path)
-
- QPointF p = QPointF(points[0], points[1]) * state->matrix;
- patternOffset = state->lastPen.dashOffset()*64;
-- lastPixel.x = -1;
-- lastPixel.y = -1;
-+ lastPixel.x = INT_MIN;
-+ lastPixel.y = INT_MIN;
-
- bool closed;
- const QPainterPath::ElementType *e = subPath(type, end, points, &closed);
-@@ -588,8 +588,8 @@ void QCosmeticStroker::drawPath(const QVectorPath &path)
- QPointF p = QPointF(points[0], points[1]) * state->matrix;
- QPointF movedTo = p;
- patternOffset = state->lastPen.dashOffset()*64;
-- lastPixel.x = -1;
-- lastPixel.y = -1;
-+ lastPixel.x = INT_MIN;
-+ lastPixel.y = INT_MIN;
-
- const qreal *begin = points;
- const qreal *end = points + 2*path.elementCount();
---
-1.9.3
-
diff --git a/0072-Fix-font-cache-check-in-QFontEngineFT-recalcAdvances.patch b/0072-Fix-font-cache-check-in-QFontEngineFT-recalcAdvances.patch
deleted file mode 100644
index 04948a0..0000000
--- a/0072-Fix-font-cache-check-in-QFontEngineFT-recalcAdvances.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From 80e3108f5cd1e1850ec81a21100d79a0946addd7 Mon Sep 17 00:00:00 2001
-From: Miikka Heikkinen <miikka.heikkinen at digia.com>
-Date: Fri, 16 Mar 2012 11:13:55 +0200
-Subject: [PATCH 72/74] Fix font cache check in QFontEngineFT::recalcAdvances()
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Cached font was used regardless of the format, resulting in incorrect
-advance in some cases when default format differed from the cached
-format.
-
-Task-number: QTBUG-24188
-Change-Id: I39e4156bd9ba743afa7e106e934c90227fbf2b8b
-Reviewed-by: Jiang Jiang <jiang.jiang at nokia.com>
-(cherry picked from qtbase/2ea976c3a713535c2419d936d575e0b24545f0fa)
-Reviewed-by: Miikka Heikkinen <miikka.heikkinen at digia.com>
-Reviewed-by: Lisandro Damián Nicanor Pérez Meyer <perezmeyer at gmail.com>
-Reviewed-by: Jiang Jiang <gzjjgod at gmail.com>
----
- src/gui/text/qfontengine_ft.cpp | 4 +++-
- 1 file changed, 3 insertions(+), 1 deletion(-)
-
-diff --git a/src/gui/text/qfontengine_ft.cpp b/src/gui/text/qfontengine_ft.cpp
-index aecbf76..44a0aca 100644
---- a/src/gui/text/qfontengine_ft.cpp
-+++ b/src/gui/text/qfontengine_ft.cpp
-@@ -1603,7 +1603,9 @@ void QFontEngineFT::recalcAdvances(QGlyphLayout *glyphs, QTextEngine::ShaperFlag
- (flags & HB_ShaperFlag_UseDesignMetrics)) && FT_IS_SCALABLE(freetype->face);
- for (int i = 0; i < glyphs->numGlyphs; i++) {
- Glyph *g = defaultGlyphSet.getGlyph(glyphs->glyphs[i]);
-- if (g) {
-+ // Since we are passing Format_None to loadGlyph, use same default format logic as loadGlyph
-+ GlyphFormat acceptableFormat = (defaultFormat != Format_None) ? defaultFormat : Format_Mono;
-+ if (g && g->format == acceptableFormat) {
- glyphs->advances_x[i] = design ? QFixed::fromFixed(g->linearAdvance) : QFixed(g->advance);
- } else {
- if (!face)
---
-1.9.3
-
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/qt4.git/commitdiff/7f5d077c3780bc4c6f65bf09831d2f030eab5846
More information about the pld-cvs-commit
mailing list