summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorOlivier Goffart <ogoffart@trolltech.com>2009-12-01 09:35:54 (GMT)
committerOlivier Goffart <ogoffart@trolltech.com>2009-12-01 09:43:19 (GMT)
commit4bb7bacccff707a693de6d50c7ce886126b68c25 (patch)
treede1c652674f7f373f3f07197755ea3e4d1b26c16 /src
parent3c1c84dd569c02bfeec66aa985616b654b69a531 (diff)
downloadQt-4bb7bacccff707a693de6d50c7ce886126b68c25.zip
Qt-4bb7bacccff707a693de6d50c7ce886126b68c25.tar.gz
Qt-4bb7bacccff707a693de6d50c7ce886126b68c25.tar.bz2
Fix QFontCombobox autotest on X11
On X11, Font might have a foundry within bracket. This foundry is set by the font combobox, and makes the font comparison fail. Make sure the other attributes (size, bold, ...) are preserved when the font is changed. Reviewed-by: Gabriel
Diffstat (limited to 'src')
-rw-r--r--src/gui/widgets/qfontcombobox.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/gui/widgets/qfontcombobox.cpp b/src/gui/widgets/qfontcombobox.cpp
index d601f81..b976b94 100644
--- a/src/gui/widgets/qfontcombobox.cpp
+++ b/src/gui/widgets/qfontcombobox.cpp
@@ -269,9 +269,8 @@ void QFontComboBoxPrivate::_q_updateModel()
void QFontComboBoxPrivate::_q_currentChanged(const QString &text)
{
Q_Q(QFontComboBox);
- QFont newFont(text);
- if (currentFont.family() != newFont.family()) {
- currentFont = newFont;
+ if (currentFont.family() != text) {
+ currentFont.setFamily(text);
emit q->currentFontChanged(currentFont);
}
}