summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Bastian <thierry.bastian@nokia.com>2009-11-11 11:43:46 (GMT)
committerThierry Bastian <thierry.bastian@nokia.com>2009-11-11 11:46:43 (GMT)
commitad5f41c02daa0278902d0e8273c8cd34efd2d6da (patch)
tree37a811503b24b5912546db76466592b73ab59a88
parent2d97f299f5f25888656696c6dad0924b243ce4fd (diff)
downloadQt-ad5f41c02daa0278902d0e8273c8cd34efd2d6da.zip
Qt-ad5f41c02daa0278902d0e8273c8cd34efd2d6da.tar.gz
Qt-ad5f41c02daa0278902d0e8273c8cd34efd2d6da.tar.bz2
Fix Font combobox: one can set the current font without it being changed
Task-number: QTBUG-5693 Reviewed-by: ogoffart
-rw-r--r--src/gui/widgets/qfontcombobox.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/gui/widgets/qfontcombobox.cpp b/src/gui/widgets/qfontcombobox.cpp
index 806db59..a66657d 100644
--- a/src/gui/widgets/qfontcombobox.cpp
+++ b/src/gui/widgets/qfontcombobox.cpp
@@ -247,7 +247,14 @@ void QFontComboBoxPrivate::_q_updateModel()
}
list = result;
+ //we need to block the signals so that the model doesn't emit reset
+ //this prevents the current index from changing
+ //it will be updated just after this
+ ///TODO: we should finda way to avoid blocking signals and have a real update of the model
+ const bool old = m->blockSignals(true);
m->setStringList(list);
+ m->blockSignals(old);
+
if (list.isEmpty()) {
if (currentFont != QFont()) {
currentFont = QFont();