extra/qt4 to 4.8.5-2

This commit is contained in:
Kevin Mihelich 2013-08-28 00:35:40 +00:00
parent 816849555e
commit 72391f45f4
3 changed files with 198 additions and 4 deletions

View file

@ -10,10 +10,10 @@
pkgname=qt4
pkgver=4.8.5
pkgrel=1
pkgrel=2
arch=('i686' 'x86_64')
url='http://qt-project.org/'
license=('GPL3' 'LGPL')
license=('GPL3' 'LGPL' 'FDL' 'custom')
pkgdesc='A cross-platform application and UI framework'
depends=('libtiff' 'libpng' 'libmng' 'sqlite' 'ca-certificates' 'dbus'
'fontconfig' 'libgl' 'libxrandr' 'libxv' 'libxi' 'alsa-lib'
@ -36,14 +36,17 @@ _pkgfqn="qt-everywhere-opensource-src-${pkgver}"
source=("http://download.qt-project.org/official_releases/qt/4.8/${pkgver}/${_pkgfqn}.tar.gz"
'qtconfig-qt4.desktop' 'assistant-qt4.desktop' 'designer-qt4.desktop'
'linguist-qt4.desktop' 'qdbusviewer-qt4.desktop'
'improve-cups-support.patch')
'improve-cups-support.patch'
'qtbug-31579.patch' 'qtbug-32534.patch')
md5sums=('1864987bdbb2f58f8ae8b350dfdbe133'
'a16638f4781e56e7887ff8212a322ecc'
'8a28b3f52dbeb685d4b69440b520a3e1'
'9727c406c240990870c905696a8c5bd1'
'0e384663d3dd32abe35f5331c4147569'
'b859c5673e5098c39f72b2252947049e'
'c439c7731c25387352d8453ca7574971')
'c439c7731c25387352d8453ca7574971'
'6ed8d26a8e4a9bba1f6c08fb99cc8357'
'bb0e0fa6ba953fa590d81ac612374e11')
prepare() {
cd ${_pkgfqn}
@ -51,6 +54,11 @@ prepare() {
# (FS#28381) (KDEBUG#180051)
patch -p1 -i "${srcdir}"/improve-cups-support.patch
# (FS#36028) (QTBUG#31579)
patch -p1 -i "${srcdir}"/qtbug-31579.patch
# (FS#36394) (QTBUG#32534)
patch -p1 -i "${srcdir}"/qtbug-32534.patch
export CXXFLAGS="$CXXFLAGS -fno-strict-volatile-bitfields"
sed -i "s|-O2|${CXXFLAGS}|" mkspecs/common/{g++,gcc}-base.conf

146
extra/qt4/qtbug-31579.patch Normal file
View file

@ -0,0 +1,146 @@
From 2a6537f0629aaff53a42d993ad94ad4de3cd3030 Mon Sep 17 00:00:00 2001
From: Gunnar Sletta <gunnar.sletta@digia.com>
Date: Thu, 4 Jul 2013 16:20:40 +1000
Subject: [PATCH] Fix drawing of 0-width polylines from outside the devicerect.
This was broken by a previous fix which aimed to fix gaps in
polylines with tiny line segments. The result was that we
skipped updating the origin point when stroke() didn't produce
pixels which accidentally included the case of the line
being completely outside the deviceRect. I fixed this
by returning the value of clipLine in drawLine to the caller
so we could still update the origin for this case.
Task-number: QTBUG-31579
Change-Id: Iac29436f042da7658bbeaf9370351dc6f2c95065
(cherry picked from qtbase/900cccfd459fcbdbc4aa3d313afe12cfbf68fd87)
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
---
src/gui/painting/qcosmeticstroker.cpp | 42 ++++++++++++++++++++------------
src/gui/painting/qcosmeticstroker_p.h | 2 +-
2 files changed, 27 insertions(+), 17 deletions(-)
diff --git a/src/gui/painting/qcosmeticstroker.cpp b/src/gui/painting/qcosmeticstroker.cpp
index 0061ecb..4413170 100644
--- a/src/gui/painting/qcosmeticstroker.cpp
+++ b/src/gui/painting/qcosmeticstroker.cpp
@@ -133,10 +133,15 @@ struct NoDasher {
};
+/*
+ * The return value is the result of the clipLine() call performed at the start
+ * of each of the two functions, aka "false" means completely outside the devices
+ * rect.
+ */
template<DrawPixel drawPixel, class Dasher>
-static void drawLine(QCosmeticStroker *stroker, qreal x1, qreal y1, qreal x2, qreal y2, int caps);
+static bool drawLine(QCosmeticStroker *stroker, qreal x1, qreal y1, qreal x2, qreal y2, int caps);
template<DrawPixel drawPixel, class Dasher>
-static void drawLineAA(QCosmeticStroker *stroker, qreal x1, qreal y1, qreal x2, qreal y2, int caps);
+static bool drawLineAA(QCosmeticStroker *stroker, qreal x1, qreal y1, qreal x2, qreal y2, int caps);
inline void drawPixel(QCosmeticStroker *stroker, int x, int y, int coverage)
{
@@ -602,17 +607,20 @@ void QCosmeticStroker::drawPath(const QVectorPath &path)
caps |= CapEnd;
QCosmeticStroker::Point last = this->lastPixel;
- stroke(this, p.x(), p.y(), p2.x(), p2.y(), caps);
+ bool unclipped = stroke(this, p.x(), p.y(), p2.x(), p2.y(), caps);
/* fix for gaps in polylines with fastpen and aliased in a sequence
of points with small distances: if current point p2 has been dropped
- out, keep last non dropped point p. */
- if (fastPenAliased) {
- if (last.x != lastPixel.x || last.y != lastPixel.y ||
- points == begin + 2 || points == end - 2 ) {
- {
- p = p2;
- }
+ out, keep last non dropped point p.
+
+ However, if the line was completely outside the devicerect, we
+ still need to update p to avoid drawing the line after this one from
+ a bad starting position.
+ */
+ if (fastPenAliased && unclipped) {
+ if (last.x != lastPixel.x || last.y != lastPixel.y
+ || points == begin + 2 || points == end - 2) {
+ p = p2;
}
} else {
p = p2;
@@ -720,10 +728,10 @@ static inline void capAdjust(int caps, int &x1, int &x2, int &y, int yinc)
the drawing shifts from horizontal to vertical or back.
*/
template<DrawPixel drawPixel, class Dasher>
-static void drawLine(QCosmeticStroker *stroker, qreal rx1, qreal ry1, qreal rx2, qreal ry2, int caps)
+static bool drawLine(QCosmeticStroker *stroker, qreal rx1, qreal ry1, qreal rx2, qreal ry2, int caps)
{
if (stroker->clipLine(rx1, ry1, rx2, ry2))
- return;
+ return false;
static const int half = 31;
int x1 = toF26Dot6(rx1) + half;
@@ -813,7 +821,7 @@ static void drawLine(QCosmeticStroker *stroker, qreal rx1, qreal ry1, qreal rx2,
} else {
// horizontal
if (!dx)
- return;
+ return true;
QCosmeticStroker::Direction dir = QCosmeticStroker::LeftToRight;
@@ -886,14 +894,15 @@ static void drawLine(QCosmeticStroker *stroker, qreal rx1, qreal ry1, qreal rx2,
}
}
stroker->lastPixel = last;
+ return true;
}
template<DrawPixel drawPixel, class Dasher>
-static void drawLineAA(QCosmeticStroker *stroker, qreal rx1, qreal ry1, qreal rx2, qreal ry2, int caps)
+static bool drawLineAA(QCosmeticStroker *stroker, qreal rx1, qreal ry1, qreal rx2, qreal ry2, int caps)
{
if (stroker->clipLine(rx1, ry1, rx2, ry2))
- return;
+ return false;
int x1 = toF26Dot6(rx1);
int y1 = toF26Dot6(ry1);
@@ -967,7 +976,7 @@ static void drawLineAA(QCosmeticStroker *stroker, qreal rx1, qreal ry1, qreal rx
} else {
// horizontal
if (!dx)
- return;
+ return true;
int yinc = F16Dot16FixedDiv(dy, dx);
@@ -1029,6 +1038,7 @@ static void drawLineAA(QCosmeticStroker *stroker, qreal rx1, qreal ry1, qreal rx
drawPixel(stroker, x, (y>>16) + 1, alpha * alphaEnd >> 6);
}
}
+ return true;
}
QT_END_NAMESPACE
diff --git a/src/gui/painting/qcosmeticstroker_p.h b/src/gui/painting/qcosmeticstroker_p.h
index 870738b..3216856 100644
--- a/src/gui/painting/qcosmeticstroker_p.h
+++ b/src/gui/painting/qcosmeticstroker_p.h
@@ -56,7 +56,7 @@ QT_MODULE(Gui)
class QCosmeticStroker;
-typedef void (*StrokeLine)(QCosmeticStroker *stroker, qreal x1, qreal y1, qreal x2, qreal y2, int caps);
+typedef bool (*StrokeLine)(QCosmeticStroker *stroker, qreal x1, qreal y1, qreal x2, qreal y2, int caps);
class QCosmeticStroker
{
--
1.7.1

View file

@ -0,0 +1,40 @@
From 1f40ed553e618c3b0511c7db4b4fd26c2d2b65bf Mon Sep 17 00:00:00 2001
From: Peter Hartmann <phartmann@blackberry.com>
Date: Thu, 25 Jul 2013 12:05:29 -0400
Subject: [PATCH] QHttpMultiPart: fix data corruption in readData method
When readData() is called repeatedly, we need to keep track which
part of the multipart message we are currently reading from.
Hereby we also need to take the boundary size into account, and not
only the size of the multipart; otherwise we would skip a not
completely read part. This would then later lead to advancing the
read pointer by negative indexes and data loss.
Task-number: QTBUG-32534
Change-Id: Ibb6dff16adaf4ea67181d23d1d0c8459e33a0ed0
Reviewed-by: Jonathan Liu <net147@gmail.com>
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
(cherry picked from qtbase/af96c6fed931564c95037539f07e9c8e33c69529)
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
---
src/network/access/qhttpmultipart.cpp | 3 +-
tests/auto/qnetworkreply/tst_qnetworkreply.cpp | 44 ++++++++++++++++++++++++
2 files changed, 46 insertions(+), 1 deletions(-)
diff --git a/src/network/access/qhttpmultipart.cpp b/src/network/access/qhttpmultipart.cpp
index 635129a..b25e917 100644
--- a/src/network/access/qhttpmultipart.cpp
+++ b/src/network/access/qhttpmultipart.cpp
@@ -488,7 +488,8 @@ qint64 QHttpMultiPartIODevice::readData(char *data, qint64 maxSize)
// skip the parts we have already read
while (index < multiPart->parts.count() &&
- readPointer >= partOffsets.at(index) + multiPart->parts.at(index).d->size())
+ readPointer >= partOffsets.at(index) + multiPart->parts.at(index).d->size()
+ + multiPart->boundary.count() + 6) // 6 == 2 boundary dashes, \r\n after boundary, \r\n after multipart
index++;
// read the data
--
1.7.1