diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2010-05-19 06:03:37 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2010-05-19 06:03:37 (GMT) |
commit | 85611635a3589d56c2670445ea5272e864e57a98 (patch) | |
tree | 9eaf0842a9cd6f719e2d64866b806a84f57f8e1e /src/gui/painting | |
parent | 6d6b7b318a842ef5037065554f30ebfb4ae34d74 (diff) | |
parent | 2fb3ec5c80a0b9d211c0168fdcd1f4fb84c9b315 (diff) | |
download | Qt-85611635a3589d56c2670445ea5272e864e57a98.zip Qt-85611635a3589d56c2670445ea5272e864e57a98.tar.gz Qt-85611635a3589d56c2670445ea5272e864e57a98.tar.bz2 |
Merge branch 'qt-4.7-from-4.6' of scm.dev.nokia.troll.no:qt/qt-integration into 4.7-integration
* 'qt-4.7-from-4.6' of scm.dev.nokia.troll.no:qt/qt-integration: (74 commits)
Fixed tst_compilerwarnings test failure due to icecc node failures.
QNAM HTTP: Remove dead code
Doc: fix typo
QCompleter: fix misuse of QMap that can lead to crashes
qmake: added possibility to specify the type of an install target
re-add overriding of tool paths to configure
fix regexp
Support linked fonts (.ltt) from standard font locations.
fix path separators in install targets for MinGW+sh
fix QMAKE_QMAKE path separator under mingw+sh in the qmake spec
define qtPrepareTool() function and use it throughout
QS60Style: In S60 3.x and 5.0 Qt itemviews behaviour is not nativelike
QNAM HTTP: And one more testcase
QNetworkAccessManager: Backends were tried in wrong order
Fix QUrl::isValid if the host contains invalid caracter.
Fix anomaly demo control strip icon placement
QUrl: parsing of host name with an undercore.
Fixed race condition compiling xmlpatterns tests.
Remove qdbusserver from tests/auto/dbus.pro
QNAM HTTP: Preemptive anti crash if() statement
...
Diffstat (limited to 'src/gui/painting')
-rw-r--r-- | src/gui/painting/qpainter.cpp | 9 | ||||
-rw-r--r-- | src/gui/painting/qpdf.cpp | 9 |
2 files changed, 16 insertions, 2 deletions
diff --git a/src/gui/painting/qpainter.cpp b/src/gui/painting/qpainter.cpp index 898a996..596649e 100644 --- a/src/gui/painting/qpainter.cpp +++ b/src/gui/painting/qpainter.cpp @@ -5977,12 +5977,17 @@ void QPainter::drawText(const QPointF &p, const QString &str, int tf, int justif gf.glyphs = engine.shapedGlyphs(&si); gf.chars = engine.layoutData->string.unicode() + si.position; gf.num_chars = engine.length(item); - gf.width = si.width; + if (engine.forceJustification) { + for (int j=0; j<gf.glyphs.numGlyphs; ++j) + gf.width += gf.glyphs.effectiveAdvance(j); + } else { + gf.width = si.width; + } gf.logClusters = engine.logClusters(&si); drawTextItem(QPointF(x.toReal(), p.y()), gf); - x += si.width; + x += gf.width; } } diff --git a/src/gui/painting/qpdf.cpp b/src/gui/painting/qpdf.cpp index 44049c0..6e02435 100644 --- a/src/gui/painting/qpdf.cpp +++ b/src/gui/painting/qpdf.cpp @@ -971,12 +971,17 @@ void QPdfBaseEngine::drawPoints (const QPointF *points, int pointCount) if (!points) return; + Q_D(QPdfBaseEngine); QPainterPath p; for (int i=0; i!=pointCount;++i) { p.moveTo(points[i]); p.lineTo(points[i] + QPointF(0, 0.001)); } + + bool hadBrush = d->hasBrush; + d->hasBrush = false; drawPath(p); + d->hasBrush = hadBrush; } void QPdfBaseEngine::drawLines (const QLineF *lines, int lineCount) @@ -984,12 +989,16 @@ void QPdfBaseEngine::drawLines (const QLineF *lines, int lineCount) if (!lines) return; + Q_D(QPdfBaseEngine); QPainterPath p; for (int i=0; i!=lineCount;++i) { p.moveTo(lines[i].p1()); p.lineTo(lines[i].p2()); } + bool hadBrush = d->hasBrush; + d->hasBrush = false; drawPath(p); + d->hasBrush = hadBrush; } void QPdfBaseEngine::drawRects (const QRectF *rects, int rectCount) |