summaryrefslogtreecommitdiffstats
path: root/src/gui/widgets/qfontcombobox.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/widgets/qfontcombobox.cpp')
-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);
}
}