summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBradley T. Hughes <bradley.hughes@nokia.com>2009-10-07 11:48:08 +0200
committerBradley T. Hughes <bradley.hughes@nokia.com>2009-10-07 11:56:10 +0200
commit591f5353c88439594b9340226b4843d7ca2888ef (patch)
tree8aa7b76f61c735a7a3418d3466af2ba9b112a64f /src
parentd47b7e6d0adcd675ba9da11818b3fa9acc3caff5 (diff)
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
Diffstat (limited to 'src')
-rw-r--r--src/gui/styles/qplastiquestyle.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/styles/qplastiquestyle.cpp b/src/gui/styles/qplastiquestyle.cpp
index 349a60d995..8e190228e8 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,