summaryrefslogtreecommitdiff
path: root/x11-toolkits
diff options
context:
space:
mode:
authorMikhail Teterin <mi@FreeBSD.org>2004-11-16 23:25:11 +0000
committerMikhail Teterin <mi@FreeBSD.org>2004-11-16 23:25:11 +0000
commit0d69f07c560ecb7747acf20e1e99e9a88278bc12 (patch)
tree954a9d23f6a4d6a91c3581b3e857e89b24b9eba0 /x11-toolkits
parentThe last commit to japanese/samba also fixed the security issue (diff)
Add the patch created by KDE people, that addresses a very annoying
problem in many Qt-based programs -- tabs are replaced by spaces. The patch is straight from KDE's qt-copy CVS tree and should be present in the next version of Qt. Bump PORTREVISION. While here, stop requiring exact versions of png, jpeg, and mng -- anything the user's system has at the time of port-building will satisfy Qt. Approved by: Andy Fawcett (as part of kde@ -- the maintainers)
Notes
Notes: svn path=/head/; revision=121782
Diffstat (limited to 'x11-toolkits')
-rw-r--r--x11-toolkits/qt33/Makefile8
-rw-r--r--x11-toolkits/qt33/files/patch-src-kernel-qrichtext.cpp61
2 files changed, 65 insertions, 4 deletions
diff --git a/x11-toolkits/qt33/Makefile b/x11-toolkits/qt33/Makefile
index 87c3431a2b25..09138e7efc42 100644
--- a/x11-toolkits/qt33/Makefile
+++ b/x11-toolkits/qt33/Makefile
@@ -8,7 +8,7 @@
PORTNAME= qt
PORTVERSION= 3.3.3
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES?= x11-toolkits ipv6
MASTER_SITES= ftp://sunsite.rediris.es/mirror/Qt/source/ \
ftp://ftp.iasi.roedu.net/mirrors/ftp.trolltech.com/qt/sources/ \
@@ -26,9 +26,9 @@ COMMENT= Multiplatform C++ application framework
BUILD_DEPENDS= qmake:${PORTSDIR}/devel/qmake
-LIB_DEPENDS+= mng.1:${PORTSDIR}/graphics/libmng \
- png.5:${PORTSDIR}/graphics/png \
- jpeg.9:${PORTSDIR}/graphics/jpeg
+LIB_DEPENDS+= mng:${PORTSDIR}/graphics/libmng \
+ png:${PORTSDIR}/graphics/png \
+ jpeg:${PORTSDIR}/graphics/jpeg
CONFLICTS= linguist-0.* qt-2.* qt-3.0.* \
qt-3.1.* qt-3.2.* qt-designer-2.* xfmail-1.5.[0-5] \
diff --git a/x11-toolkits/qt33/files/patch-src-kernel-qrichtext.cpp b/x11-toolkits/qt33/files/patch-src-kernel-qrichtext.cpp
new file mode 100644
index 000000000000..336b0c18a417
--- /dev/null
+++ b/x11-toolkits/qt33/files/patch-src-kernel-qrichtext.cpp
@@ -0,0 +1,61 @@
+--- src/kernel/qrichtext.cpp 2004/08/11 14:21:12 1.68
++++ src/kernel/qrichtext.cpp 2004/09/07 09:10:27 1.71
+@@ -3801,6 +3801,7 @@ void QTextString::checkBidi() const
+
+ // determines the properties we need for layouting
+ QTextEngine textEngine( toString(), 0 );
++ textEngine.direction = (QChar::Direction) dir;
+ textEngine.itemize(QTextEngine::SingleLine);
+ const QCharAttributes *ca = textEngine.attributes() + length-1;
+ QTextStringChar *ch = (QTextStringChar *)end - 1;
+@@ -3835,7 +3836,7 @@ void QTextString::checkBidi() const
+ } else if ( dir == QChar::DirL ) {
+ that->rightToLeft = FALSE;
+ } else {
+- that->rightToLeft = (textEngine.items[0].analysis.bidiLevel % 2);
++ that->rightToLeft = (textEngine.direction == QChar::DirR);
+ }
+ }
+
+@@ -4510,6 +4510,8 @@ void QTextParagraph::paint( QPainter &pa
+ fullSelectionWidth = (hasdoc ? document()->width() : r.width());
+
+ QString qstr = str->toString();
++ // detach string
++ qstr.setLength(qstr.length());
+ // ### workaround so that \n are not drawn, actually this should
+ // be fixed in QFont somewhere (under Windows you get ugly boxes
+ // otherwise)
+@@ -5310,7 +5312,7 @@ QTextLineStart *QTextFormatter::formatLi
+ #endif
+
+ // collects one line of the paragraph and transforms it to visual order
+-QTextLineStart *QTextFormatter::bidiReorderLine( QTextParagraph * /*parag*/, QTextString *text, QTextLineStart *line,
++QTextLineStart *QTextFormatter::bidiReorderLine( QTextParagraph * parag, QTextString *text, QTextLineStart *line,
+ QTextStringChar *startChar, QTextStringChar *lastChar, int align, int space )
+ {
+ // ignore white space at the end of the line.
+@@ -5404,6 +5406,7 @@ QTextLineStart *QTextFormatter::bidiReor
+ }
+
+ ch->x = x + toAdd;
++ ch->rightToLeft = ch->bidiLevel % 2;
+ //qDebug("visual: %d (%p) placed at %d rightToLeft=%d", visual[i], ch, x +toAdd, ch->rightToLeft );
+ int ww = 0;
+ if ( ch->c.unicode() >= 32 || ch->c == '\t' || ch->c == '\n' || ch->isCustom() ) {
+@@ -5419,12 +5422,14 @@ QTextLineStart *QTextFormatter::bidiReor
+ while ( endSpaces-- ) {
+ ++lastChar;
+ int sw = lastChar->format()->width( ' ' );
+- if ( lastChar->rightToLeft ) {
++ if ( text->isRightToLeft() ) {
+ xorig -= sw;
+ lastChar->x = xorig;
++ ch->rightToLeft = TRUE;
+ } else {
+ lastChar->x = x;
+ x += sw;
++ ch->rightToLeft = FALSE;
+ }
+ }
+