summaryrefslogtreecommitdiffstats
path: root/src/gui/text/qrawfont.cpp
diff options
context:
space:
mode:
authorPierre Rossi <pierre.rossi@nokia.com>2012-03-30 22:33:05 +0200
committerQt by Nokia <qt-info@nokia.com>2012-04-03 10:45:02 +0200
commitdb347ec2f8949da0bcbc28f2d2c43c213bd89cfe (patch)
treeec189f9f0e7c476f38b6bdaa821f6a02275c49db /src/gui/text/qrawfont.cpp
parentf913859f88c5f032833f6eeb1c9c3066f4405a9a (diff)
Return early in QRawFont::setPixelSize.
We would otherwise end up cloning the font engine for absolutely no reason when the pixel size is already right. Change-Id: I8c34d2b53b596ad49d00031a3fb8e79f3b30d591 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
Diffstat (limited to 'src/gui/text/qrawfont.cpp')
-rw-r--r--src/gui/text/qrawfont.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/text/qrawfont.cpp b/src/gui/text/qrawfont.cpp
index 9fbeef4685..5cdd563a33 100644
--- a/src/gui/text/qrawfont.cpp
+++ b/src/gui/text/qrawfont.cpp
@@ -672,7 +672,7 @@ QRawFont QRawFont::fromFont(const QFont &font, QFontDatabase::WritingSystem writ
*/
void QRawFont::setPixelSize(qreal pixelSize)
{
- if (d->fontEngine == 0)
+ if (d->fontEngine == 0 || qFuzzyCompare(d->fontEngine->fontDef.pixelSize, pixelSize))
return;
d.detach();