summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-10-09 19:51:55 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-10-09 19:51:55 (GMT)
commit965516d4ed2f600b28ee730d4dfbdc083ecdbac4 (patch)
treec2e8c4972bdf3596730a79319844050cdf32fd7b /src/gui
parent1dfe43a858b4b5a60004160086e7486d8f80e064 (diff)
parent4809920df3c3329d47f595c1287ab44b454abb88 (diff)
downloadQt-965516d4ed2f600b28ee730d4dfbdc083ecdbac4.zip
Qt-965516d4ed2f600b28ee730d4dfbdc083ecdbac4.tar.gz
Qt-965516d4ed2f600b28ee730d4dfbdc083ecdbac4.tar.bz2
Merge branch 4.7 into qt-master-from-4.7
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/image/qimage.cpp4
-rw-r--r--src/gui/text/qtextengine.cpp16
2 files changed, 14 insertions, 6 deletions
diff --git a/src/gui/image/qimage.cpp b/src/gui/image/qimage.cpp
index 300e04b..5829fe8 100644
--- a/src/gui/image/qimage.cpp
+++ b/src/gui/image/qimage.cpp
@@ -6689,6 +6689,10 @@ bool QImageData::convertInPlace(QImage::Format newFormat, Qt::ImageConversionFla
if (format == newFormat)
return true;
+ // No in-place conversion if we have to detach
+ if (ref > 1)
+ return false;
+
const InPlace_Image_Converter *const converterPtr = &inplace_converter_map[format][newFormat];
InPlace_Image_Converter converter = *converterPtr;
if (converter)
diff --git a/src/gui/text/qtextengine.cpp b/src/gui/text/qtextengine.cpp
index 34d9fa6..f4f2168 100644
--- a/src/gui/text/qtextengine.cpp
+++ b/src/gui/text/qtextengine.cpp
@@ -1976,9 +1976,11 @@ void QTextEngine::justify(const QScriptLine &line)
if (kashida_pos >= 0) {
// qDebug("kashida position at %d in word", kashida_pos);
set(&justificationPoints[nPoints], kashida_type, g.mid(kashida_pos), fontEngine(si));
- minKashida = qMin(minKashida, justificationPoints[nPoints].kashidaWidth);
- maxJustify = qMax(maxJustify, justificationPoints[nPoints].type);
- ++nPoints;
+ if (justificationPoints[nPoints].kashidaWidth > 0) {
+ minKashida = qMin(minKashida, justificationPoints[nPoints].kashidaWidth);
+ maxJustify = qMax(maxJustify, justificationPoints[nPoints].type);
+ ++nPoints;
+ }
}
kashida_pos = -1;
kashida_type = HB_Arabic_Normal;
@@ -2002,9 +2004,11 @@ void QTextEngine::justify(const QScriptLine &line)
}
if (kashida_pos >= 0) {
set(&justificationPoints[nPoints], kashida_type, g.mid(kashida_pos), fontEngine(si));
- minKashida = qMin(minKashida, justificationPoints[nPoints].kashidaWidth);
- maxJustify = qMax(maxJustify, justificationPoints[nPoints].type);
- ++nPoints;
+ if (justificationPoints[nPoints].kashidaWidth > 0) {
+ minKashida = qMin(minKashida, justificationPoints[nPoints].kashidaWidth);
+ maxJustify = qMax(maxJustify, justificationPoints[nPoints].type);
+ ++nPoints;
+ }
}
}