QFontComboBox: use QSignalBlocker
Change-Id: I6a9eab39088275427e4282ee590fda439b2f2901 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
This commit is contained in:
parent
180e28ef50
commit
6861fb2577
@ -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);
|
||||
{
|
||||
const QSignalBlocker blocker(m);
|
||||
m->setStringList(list);
|
||||
m->blockSignals(old);
|
||||
}
|
||||
|
||||
if (list.isEmpty()) {
|
||||
if (currentFont != QFont()) {
|
||||
|
Loading…
Reference in New Issue
Block a user