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>
This commit is contained in:
parent
f913859f88
commit
db347ec2f8
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user