forked from qt-creator/qt-creator
Replace manual signal blocking/unblocking with QSignalBlocker
Change-Id: Ibb59fab4e37d045e506c5a8172b6f5cbb955b028 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -42,9 +42,8 @@ enum { spacing = 2 };
|
||||
|
||||
static void inline setComboBlocked(QComboBox *cb, int index)
|
||||
{
|
||||
const bool blocked = cb->blockSignals(true);
|
||||
QSignalBlocker blocker(cb);
|
||||
cb->setCurrentIndex(index);
|
||||
cb->blockSignals(blocked);
|
||||
}
|
||||
|
||||
/*!
|
||||
|
||||
Reference in New Issue
Block a user