QFontComboBox: use QSignalBlocker

Change-Id: I6a9eab39088275427e4282ee590fda439b2f2901
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
This commit is contained in:
Marc Mutz 2013-10-26 11:06:43 +02:00 committed by The Qt Project
parent 180e28ef50
commit 6861fb2577

View File

@ -346,9 +346,10 @@ void QFontComboBoxPrivate::_q_updateModel()
//this prevents the current index from changing //this prevents the current index from changing
//it will be updated just after this //it will be updated just after this
///TODO: we should finda way to avoid blocking signals and have a real update of the model ///TODO: we should finda way to avoid blocking signals and have a real update of the model
const bool old = m->blockSignals(true); {
const QSignalBlocker blocker(m);
m->setStringList(list); m->setStringList(list);
m->blockSignals(old); }
if (list.isEmpty()) { if (list.isEmpty()) {
if (currentFont != QFont()) { if (currentFont != QFont()) {