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:
@@ -355,10 +355,9 @@ void GdbServerProviderConfigWidget::clearErrorMessage()
|
||||
|
||||
void GdbServerProviderConfigWidget::setFromProvider()
|
||||
{
|
||||
const bool b = blockSignals(true);
|
||||
QSignalBlocker blocker(this);
|
||||
m_nameLineEdit->setText(m_provider->displayName());
|
||||
setStartupMode(m_provider->startupMode());
|
||||
blockSignals(b);
|
||||
}
|
||||
|
||||
QString GdbServerProviderConfigWidget::defaultInitCommandsTooltip()
|
||||
@@ -398,9 +397,8 @@ HostWidget::HostWidget(QWidget *parent)
|
||||
|
||||
void HostWidget::setHost(const QString &host)
|
||||
{
|
||||
const bool b = blockSignals(true);
|
||||
QSignalBlocker blocker(this);
|
||||
m_hostLineEdit->setText(host);
|
||||
blockSignals(b);
|
||||
}
|
||||
|
||||
QString HostWidget::host() const
|
||||
@@ -410,9 +408,8 @@ QString HostWidget::host() const
|
||||
|
||||
void HostWidget::setPort(const quint16 &port)
|
||||
{
|
||||
const bool b = blockSignals(true);
|
||||
QSignalBlocker blocker(this);
|
||||
m_portSpinBox->setValue(port);
|
||||
blockSignals(b);
|
||||
}
|
||||
|
||||
quint16 HostWidget::port() const
|
||||
|
||||
Reference in New Issue
Block a user