summaryrefslogtreecommitdiffstats
path: root/src/gui/text/qfont.cpp
diff options
context:
space:
mode:
authorTrond Kjernåsen <trond.kjernasen@nokia.com>2010-05-12 14:51:00 +0200
committerTrond Kjernåsen <trond.kjernasen@nokia.com>2010-05-12 15:17:29 +0200
commit1022d67cde2c8c45c304612732e0399c66f8a04a (patch)
tree7cccfb0507a13f062b2ea46faf26d296f2a01643 /src/gui/text/qfont.cpp
parenta50eed92125dc366163dc09164912eaf105d513f (diff)
Fixed QFont to respect the italics constructor flag.
Creating a QFont with the constructor that takes the italic bool flag didn't work properly, since the property wasn't set to be resolved. It may be that the property should *always* be resolved, but to minimize impact, it's only done now if you pass in 'true' for italics. Reviewed-by: Eskil
Diffstat (limited to 'src/gui/text/qfont.cpp')
-rw-r--r--src/gui/text/qfont.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gui/text/qfont.cpp b/src/gui/text/qfont.cpp
index b349bcfbe9..b02a42e877 100644
--- a/src/gui/text/qfont.cpp
+++ b/src/gui/text/qfont.cpp
@@ -805,6 +805,9 @@ QFont::QFont(const QString &family, int pointSize, int weight, bool italic)
resolve_mask |= QFont::WeightResolved | QFont::StyleResolved;
}
+ if (italic)
+ resolve_mask |= QFont::StyleResolved;
+
d->request.family = family;
d->request.pointSize = qreal(pointSize);
d->request.pixelSize = -1;