summaryrefslogtreecommitdiffstats
path: root/src/gui/styles/qmacstyle_mac.mm
diff options
context:
space:
mode:
authorOlivier Goffart <ogoffart@trolltech.com>2010-01-11 13:49:39 (GMT)
committerOlivier Goffart <ogoffart@trolltech.com>2010-01-11 14:04:49 (GMT)
commita34d372b45d75a32dcc300dbb7f8151e15df4294 (patch)
tree03b022318fc6f6041079c1926b2f6e0ff9116c44 /src/gui/styles/qmacstyle_mac.mm
parent820db2b2c5a0fc470fa5759d95ea49305ec98654 (diff)
downloadQt-a34d372b45d75a32dcc300dbb7f8151e15df4294.zip
Qt-a34d372b45d75a32dcc300dbb7f8151e15df4294.tar.gz
Qt-a34d372b45d75a32dcc300dbb7f8151e15df4294.tar.bz2
Fixes warning in the QMacStyle
Warning such as QFont::setPointSizeF: Point size <= 0 (-1.000000), must be greater than 0 because the font size might be specified in pixel, and pointSizeF returns -1 if the font size is in pixel (as documented) Reviewed-by: jbache Task-number: QTBUG-7263
Diffstat (limited to 'src/gui/styles/qmacstyle_mac.mm')
-rw-r--r--src/gui/styles/qmacstyle_mac.mm2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/styles/qmacstyle_mac.mm b/src/gui/styles/qmacstyle_mac.mm
index 4075cf7..25e3028 100644
--- a/src/gui/styles/qmacstyle_mac.mm
+++ b/src/gui/styles/qmacstyle_mac.mm
@@ -3996,7 +3996,7 @@ void QMacStyle::drawControl(ControlElement ce, const QStyleOption *opt, QPainter
// This is mainly to handle cases where someone sets the font on the window
// and then the combo inherits it and passes it onward. At that point the resolve mask
// is very, very weak. This makes it stonger.
- myFont.setPointSizeF(mi->font.pointSizeF());
+ myFont.setPointSizeF(QFontInfo(mi->font).pointSizeF());
p->setFont(myFont);
p->drawText(xpos, yPos, contentRect.width() - xm - tabwidth + 1,
contentRect.height(), text_flags ^ Qt::AlignRight, s);