summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorOlivier Goffart <ogoffart@trolltech.com>2009-11-11 16:30:54 (GMT)
committerOlivier Goffart <ogoffart@trolltech.com>2009-11-11 16:30:54 (GMT)
commit2d63f8fe5b77747014e1c5807c9d457611bd9304 (patch)
tree12f2a2efcb619e58b0089e59d3efeff50326e720 /src
parent46a3e518b3070cf7cb4cbbb2cb58254454cf169d (diff)
downloadQt-2d63f8fe5b77747014e1c5807c9d457611bd9304.zip
Qt-2d63f8fe5b77747014e1c5807c9d457611bd9304.tar.gz
Qt-2d63f8fe5b77747014e1c5807c9d457611bd9304.tar.bz2
Fixed: QFontComboBox emits the currentFontChanged() signal twice
Task-number: QTBUG-2438 Reviewed-by: Thierry
Diffstat (limited to 'src')
-rw-r--r--src/gui/widgets/qfontcombobox.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gui/widgets/qfontcombobox.cpp b/src/gui/widgets/qfontcombobox.cpp
index a66657d..d601f81 100644
--- a/src/gui/widgets/qfontcombobox.cpp
+++ b/src/gui/widgets/qfontcombobox.cpp
@@ -427,8 +427,10 @@ void QFontComboBox::setCurrentFont(const QFont &font)
Q_D(QFontComboBox);
if (font != d->currentFont) {
d->currentFont = font;
- emit currentFontChanged(d->currentFont);
d->_q_updateModel();
+ if (d->currentFont == font) { //else the signal has already be emitted by _q_updateModel
+ emit currentFontChanged(d->currentFont);
+ }
}
}