summaryrefslogtreecommitdiffstats
path: root/src/gui/text
diff options
context:
space:
mode:
authorWater-Team <water@pad.test.qt.nokia.com>2011-10-17 23:00:33 (GMT)
committerWater-Team <water@pad.test.qt.nokia.com>2011-10-17 23:00:33 (GMT)
commit923693d4919f22eabd5cec8fb6e855514bb64fb7 (patch)
treece5c6ec3f89b9bef3684c748bc4bc39af0d53a9a /src/gui/text
parentec9a31abf003880a60d1120738a3bee7075b8ca8 (diff)
parent09e7218a1c30ca33a5d82280f89f07ba54b96555 (diff)
downloadQt-923693d4919f22eabd5cec8fb6e855514bb64fb7.zip
Qt-923693d4919f22eabd5cec8fb6e855514bb64fb7.tar.gz
Qt-923693d4919f22eabd5cec8fb6e855514bb64fb7.tar.bz2
Merge branch '4.8-upstream' into master-water
Diffstat (limited to 'src/gui/text')
-rw-r--r--src/gui/text/qfontdatabase.cpp4
-rw-r--r--src/gui/text/qfontengine.cpp4
-rw-r--r--src/gui/text/qtextdocument.cpp2
3 files changed, 5 insertions, 5 deletions
diff --git a/src/gui/text/qfontdatabase.cpp b/src/gui/text/qfontdatabase.cpp
index 1d463c4..796c455 100644
--- a/src/gui/text/qfontdatabase.cpp
+++ b/src/gui/text/qfontdatabase.cpp
@@ -1994,7 +1994,7 @@ QList<int> QFontDatabase::pointSizes(const QString &family,
const QtFontSize *size = style->pixelSizes + l;
if (size->pixelSize != 0 && size->pixelSize != USHRT_MAX) {
- const uint pointSize = qRound(size->pixelSize * 72.0 / dpi);
+ const uint pointSize = qRound(size->pixelSize * qreal(72.0) / dpi);
if (! sizes.contains(pointSize))
sizes.append(pointSize);
}
@@ -2105,7 +2105,7 @@ QList<int> QFontDatabase::smoothSizes(const QString &family,
const QtFontSize *size = style->pixelSizes + l;
if (size->pixelSize != 0 && size->pixelSize != USHRT_MAX) {
- const uint pointSize = qRound(size->pixelSize * 72.0 / dpi);
+ const uint pointSize = qRound(size->pixelSize * qreal(72.0) / dpi);
if (! sizes.contains(pointSize))
sizes.append(pointSize);
}
diff --git a/src/gui/text/qfontengine.cpp b/src/gui/text/qfontengine.cpp
index c9b672b..8f46a80 100644
--- a/src/gui/text/qfontengine.cpp
+++ b/src/gui/text/qfontengine.cpp
@@ -381,9 +381,9 @@ void QFontEngine::getGlyphBearings(glyph_t glyph, qreal *leftBearing, qreal *rig
glyph_metrics_t gi = boundingBox(glyph);
bool isValid = gi.isValid();
if (leftBearing != 0)
- *leftBearing = isValid ? gi.x.toReal() : 0.0;
+ *leftBearing = isValid ? gi.x.toReal() : qreal(0.0);
if (rightBearing != 0)
- *rightBearing = isValid ? (gi.xoff - gi.x - gi.width).toReal() : 0.0;
+ *rightBearing = isValid ? (gi.xoff - gi.x - gi.width).toReal() : qreal(0.0);
}
glyph_metrics_t QFontEngine::tightBoundingBox(const QGlyphLayout &glyphs)
diff --git a/src/gui/text/qtextdocument.cpp b/src/gui/text/qtextdocument.cpp
index 143dc1a..de2e27a 100644
--- a/src/gui/text/qtextdocument.cpp
+++ b/src/gui/text/qtextdocument.cpp
@@ -159,7 +159,7 @@ bool Qt::mightBeRichText(const QString& text)
QString Qt::escape(const QString& plain)
{
QString rich;
- rich.reserve(int(plain.length() * 1.1));
+ rich.reserve(int(plain.length() * qreal(1.1)));
for (int i = 0; i < plain.length(); ++i) {
if (plain.at(i) == QLatin1Char('<'))
rich += QLatin1String("&lt;");