summaryrefslogtreecommitdiffstats
path: root/tools/shared/fontpanel/fontpanel.cpp
diff options
context:
space:
mode:
authorck <qt-info@nokia.com>2009-11-16 16:42:39 (GMT)
committerck <qt-info@nokia.com>2009-11-16 16:42:39 (GMT)
commitf7dbb28ca4fcb56e01dc79cec7df77f80fe530a8 (patch)
treed1cc38c44f473bbdc0784d44b78f088280d0580c /tools/shared/fontpanel/fontpanel.cpp
parentf3556c2afa373cd37cb64e35b4b1d990558396c8 (diff)
downloadQt-f7dbb28ca4fcb56e01dc79cec7df77f80fe530a8.zip
Qt-f7dbb28ca4fcb56e01dc79cec7df77f80fe530a8.tar.gz
Qt-f7dbb28ca4fcb56e01dc79cec7df77f80fe530a8.tar.bz2
Assistant/Designer: Fix handling of oblique font styles.
Task-number: QT-1764 Reviewed-by: kh1
Diffstat (limited to 'tools/shared/fontpanel/fontpanel.cpp')
-rw-r--r--tools/shared/fontpanel/fontpanel.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/tools/shared/fontpanel/fontpanel.cpp b/tools/shared/fontpanel/fontpanel.cpp
index 46ce144..c2defc7 100644
--- a/tools/shared/fontpanel/fontpanel.cpp
+++ b/tools/shared/fontpanel/fontpanel.cpp
@@ -96,8 +96,12 @@ QFont FontPanel::selectedFont() const
const QString family = rc.family();
rc.setPointSize(pointSize());
const QString styleDescription = styleString();
- rc.setItalic(m_fontDatabase.italic(family, styleDescription));
-
+ if (styleDescription.contains(QLatin1String("Italic")))
+ rc.setStyle(QFont::StyleItalic);
+ else if (styleDescription.contains(QLatin1String("Oblique")))
+ rc.setStyle(QFont::StyleOblique);
+ else
+ rc.setStyle(QFont::StyleNormal);
rc.setBold(m_fontDatabase.bold(family, styleDescription));
// Weight < 0 asserts...