QInputDialog: use QSignalBlocker

Change-Id: I711dbc0c35bc51ad3149e3d7b41e716bc9ab94b5
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
This commit is contained in:
Marc Mutz 2013-10-26 11:05:42 +02:00 committed by The Qt Project
parent 64050fe92e
commit 694e822080

View File

@ -771,10 +771,11 @@ void QInputDialog::setComboBoxItems(const QStringList &items)
Q_D(QInputDialog);
d->ensureComboBox();
d->comboBox->blockSignals(true);
d->comboBox->clear();
d->comboBox->addItems(items);
d->comboBox->blockSignals(false);
{
const QSignalBlocker blocker(d->comboBox);
d->comboBox->clear();
d->comboBox->addItems(items);
}
if (inputMode() == TextInput)
d->chooseRightTextInputWidget();