summaryrefslogtreecommitdiffstats
path: root/src/widgets/widgets/qfontcombobox.cpp
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2013-10-26 11:06:43 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-10-30 12:58:34 +0100
commit6861fb25771e3e574a9b5c229d0cdd26119f6bf3 (patch)
treea5975063cccb069aac5e1c8268d0c09b926d4128 /src/widgets/widgets/qfontcombobox.cpp
parent180e28ef5086fe82c69ec6406ab5bc4202f7fc4d (diff)
QFontComboBox: use QSignalBlocker
Change-Id: I6a9eab39088275427e4282ee590fda439b2f2901 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Diffstat (limited to 'src/widgets/widgets/qfontcombobox.cpp')
-rw-r--r--src/widgets/widgets/qfontcombobox.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/widgets/widgets/qfontcombobox.cpp b/src/widgets/widgets/qfontcombobox.cpp
index 0b0efa2bdf..2bbf3730db 100644
--- a/src/widgets/widgets/qfontcombobox.cpp
+++ b/src/widgets/widgets/qfontcombobox.cpp
@@ -346,9 +346,10 @@ void QFontComboBoxPrivate::_q_updateModel()
//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);
+ {
+ const QSignalBlocker blocker(m);
+ m->setStringList(list);
+ }
if (list.isEmpty()) {
if (currentFont != QFont()) {