diff options
author | Bradley T. Hughes <bradley.hughes@nokia.com> | 2009-10-07 09:48:08 (GMT) |
---|---|---|
committer | Bradley T. Hughes <bradley.hughes@nokia.com> | 2009-10-07 09:56:10 (GMT) |
commit | 591f5353c88439594b9340226b4843d7ca2888ef (patch) | |
tree | 8aa7b76f61c735a7a3418d3466af2ba9b112a64f | |
parent | d47b7e6d0adcd675ba9da11818b3fa9acc3caff5 (diff) | |
download | Qt-591f5353c88439594b9340226b4843d7ca2888ef.zip Qt-591f5353c88439594b9340226b4843d7ca2888ef.tar.gz Qt-591f5353c88439594b9340226b4843d7ca2888ef.tar.bz2 |
Fix ASSERT caused by Plastique style when setting an application font with a pixel size
Use QFontInfo to query the pointSize() instead of asking the font
directly, fixing this assert:
ASSERT failure in QFont::setPointSize: "point size must be greater than 0", file text/qfont.cpp, line 855
Task-number: QTBUG-3555
Reviewed-by: Simon Hausmann
-rw-r--r-- | src/gui/styles/qplastiquestyle.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/styles/qplastiquestyle.cpp b/src/gui/styles/qplastiquestyle.cpp index 349a60d..8e19022 100644 --- a/src/gui/styles/qplastiquestyle.cpp +++ b/src/gui/styles/qplastiquestyle.cpp @@ -3328,7 +3328,7 @@ void QPlastiqueStyle::drawControl(ControlElement element, const QStyleOption *op // Draw the text centered QFont font = painter->font(); - font.setPointSize(font.pointSize() - 1); + font.setPointSize(QFontInfo(font).pointSize() - 1); painter->setFont(font); painter->setPen(dockWidget->palette.windowText().color()); painter->drawText(titleRect, |