From 6861fb25771e3e574a9b5c229d0cdd26119f6bf3 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Sat, 26 Oct 2013 11:06:43 +0200 Subject: [PATCH] QFontComboBox: use QSignalBlocker Change-Id: I6a9eab39088275427e4282ee590fda439b2f2901 Reviewed-by: Olivier Goffart --- src/widgets/widgets/qfontcombobox.cpp | 7 ++++--- 1 file 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()) {