summaryrefslogtreecommitdiffstats
path: root/recipes-qt/qt5/qtbase-git/0027-Fix-misaligned-selection-region-with-text-when-cente.patch
diff options
context:
space:
mode:
authorMartin Jansa <Martin.Jansa@gmail.com>2013-11-02 19:06:14 +0100
committerMartin Jansa <Martin.Jansa@gmail.com>2014-01-12 15:01:37 +0100
commitc908fe4ebd5a04813be0b83c173fae182bb22728 (patch)
treeac8f089c2dce89598cf96532eac24cfb33567e4b /recipes-qt/qt5/qtbase-git/0027-Fix-misaligned-selection-region-with-text-when-cente.patch
parent775d77e482f1ea203c78003cccd2547075fd720f (diff)
downloadmeta-qt5-c908fe4ebd5a04813be0b83c173fae182bb22728.tar.gz
qt5: upgrade to 5.2.0
* drop 0027-Fix-misaligned-selection-region-with-text-when-cente.patch resolved in upstream commit 5d8a882c11201a29475c5ea71cfb76c9de6573f5 * drop 0020-Use-BGRA-extension-in-bindTexture.patch resolved in upstream commit e1325cf26e146b68725cc1a0a02b274ce3dfbe5c * drop 0008-wayland-scanner-disable-silent-rules.patch resolved upstream in: commit 2ff2a7c32d76b9e58b800f12469f112cfdb6ad3c Author: Jan Arne Petersen <jan.petersen@kdab.com> Date: Fri Jul 19 14:35:19 2013 +0200 Fix wayland-scanner to work with CONFIG+=silent * squash to match more with structure of https://github.com/meta-qt5/qtbase/tree/stable * qtmodules: bump SRCREVs for 5.2.0 tags now all modules using qt5-git should be newer than any 5.1.* version * qtbase: fix paths in packageconfig *.pc files include- and lib-paths contained build-sysroot paths * qtwebkit: Explicitly add ICU libraries to LIBS fails to build without this * qtjsbackend: remove for git versions Found in [1]: Qt Qml is now using its own built-in Javascript engine and does not depend on V8 anymore. As such the QtJSBackend shared library has disappeared. [1] http://blog.qt.digia.com/blog/2013/09/30/qt-5-2-alpha-available/ * qt5: Upgrade 5.1.1 recipes to 5.2.0 to match git recipes qtjsbackend is now completely gone it allows to share more .patch files and configuration in .inc again Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'recipes-qt/qt5/qtbase-git/0027-Fix-misaligned-selection-region-with-text-when-cente.patch')
-rw-r--r--recipes-qt/qt5/qtbase-git/0027-Fix-misaligned-selection-region-with-text-when-cente.patch74
1 files changed, 0 insertions, 74 deletions
diff --git a/recipes-qt/qt5/qtbase-git/0027-Fix-misaligned-selection-region-with-text-when-cente.patch b/recipes-qt/qt5/qtbase-git/0027-Fix-misaligned-selection-region-with-text-when-cente.patch
deleted file mode 100644
index d5e082ea..00000000
--- a/recipes-qt/qt5/qtbase-git/0027-Fix-misaligned-selection-region-with-text-when-cente.patch
+++ /dev/null
@@ -1,74 +0,0 @@
1From 5d8a882c11201a29475c5ea71cfb76c9de6573f5 Mon Sep 17 00:00:00 2001
2From: Jonathan Liu <net147@gmail.com>
3Date: Wed, 23 Oct 2013 00:28:17 +1100
4Subject: [PATCH] Fix misaligned selection region with text when centered
5
6If the text is centered, the x/y position in the selection QRectF may
7be a multiple of 0.5 which is rounded up. This rounding causes
8misalignment of the selection region with the text.
9
10The alignment is fixed by using qFloor on the x and y components.
11
12Upstream-Status: Accepted [https://codereview.qt-project.org/#change,68842]
13Signed-off-by: Jonathan Liu <net147@gmail.com>
14
15Task-number: QTBUG-34218
16Task-number: QTBUG-34234
17Change-Id: I4f2fadeb38602f62a93773c6e5faecf03b28069f
18Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
19---
20 src/gui/text/qtextlayout.cpp | 19 ++++++++++++++-----
21 1 file changed, 14 insertions(+), 5 deletions(-)
22
23diff --git a/src/gui/text/qtextlayout.cpp b/src/gui/text/qtextlayout.cpp
24index 54d337e..66341e1 100644
25--- a/src/gui/text/qtextlayout.cpp
26+++ b/src/gui/text/qtextlayout.cpp
27@@ -44,6 +44,7 @@
28
29 #include <qthread.h>
30 #include <qfont.h>
31+#include <qmath.h>
32 #include <qpainter.h>
33 #include <qvarlengtharray.h>
34 #include <qtextformat.h>
35@@ -946,15 +947,23 @@ static void addSelectedRegionsToPath(QTextEngine *eng, int lineNumber, const QPo
36 continue;
37 }
38
39- if (lastSelectionWidth > 0)
40- region->addRect(boundingRect & QRectF(lastSelectionX.toReal(), selectionY, lastSelectionWidth.toReal(), lineHeight));
41+ if (lastSelectionWidth > 0) {
42+ QRectF rect = boundingRect & QRectF(lastSelectionX.toReal(), selectionY, lastSelectionWidth.toReal(), lineHeight);
43+ rect.moveLeft(qFloor(rect.left()));
44+ rect.moveTop(qFloor(rect.top()));
45+ region->addRect(rect);
46+ }
47
48 lastSelectionX = selectionX;
49 lastSelectionWidth = selectionWidth;
50 }
51 }
52- if (lastSelectionWidth > 0)
53- region->addRect(boundingRect & QRectF(lastSelectionX.toReal(), selectionY, lastSelectionWidth.toReal(), lineHeight));
54+ if (lastSelectionWidth > 0) {
55+ QRectF rect = boundingRect & QRectF(lastSelectionX.toReal(), selectionY, lastSelectionWidth.toReal(), lineHeight);
56+ rect.moveLeft(qFloor(rect.left()));
57+ rect.moveTop(qFloor(rect.top()));
58+ region->addRect(rect);
59+ }
60 }
61
62 static inline QRectF clipIfValid(const QRectF &rect, const QRectF &clip)
63@@ -2077,7 +2086,7 @@ static void setPenAndDrawBackground(QPainter *p, const QPen &defaultPen, const Q
64
65 QBrush bg = chf.background();
66 if (bg.style() != Qt::NoBrush && !chf.property(SuppressBackground).toBool())
67- p->fillRect(r, bg);
68+ p->fillRect(QRectF(qFloor(r.x()), qFloor(r.y()), r.width(), r.height()), bg);
69 if (c.style() != Qt::NoBrush) {
70 p->setPen(QPen(c, 0));
71 }
72--
731.8.4
74