Commit 6ccc08fb authored by Roberto Raggi's avatar Roberto Raggi
Browse files

Restore the state of QObject::blockSignals()

parent cbf24ab6
......@@ -288,9 +288,9 @@ void SideBarWidget::setCurrentItem(const QString &title)
int idx = m_comboBox->findText(title);
if (idx < 0)
idx = 0;
m_comboBox->blockSignals(true);
bool blocked = m_comboBox->blockSignals(true);
m_comboBox->setCurrentIndex(idx);
m_comboBox->blockSignals(false);
m_comboBox->blockSignals(blocked);
}
SideBarItem *item = m_sideBar->item(title);
......@@ -307,7 +307,7 @@ void SideBarWidget::setCurrentItem(const QString &title)
void SideBarWidget::updateAvailableItems()
{
m_comboBox->blockSignals(true);
bool blocked = m_comboBox->blockSignals(true);
QString current = m_comboBox->currentText();
m_comboBox->clear();
QStringList itms = m_sideBar->availableItems();
......@@ -320,7 +320,7 @@ void SideBarWidget::updateAvailableItems()
idx = 0;
m_comboBox->setCurrentIndex(idx);
m_splitButton->setEnabled(itms.count() > 1);
m_comboBox->blockSignals(false);
m_comboBox->blockSignals(blocked);
}
void SideBarWidget::removeCurrentItem()
......
......@@ -337,9 +337,9 @@ void PlainGdbAdapter::emitAdapterStartFailed(const QString &msg)
{
// QMessageBox::critical(mainWindow(), tr("Debugger Startup Failure"),
// tr("Cannot start debugger: %1").arg(m_gdbAdapter->errorString()));
m_stubProc.blockSignals(true);
bool blocked = m_stubProc.blockSignals(true);
m_stubProc.stop();
m_stubProc.blockSignals(false);
m_stubProc.blockSignals(blocked);
emit adapterStartFailed(msg);
}
......
......@@ -633,9 +633,9 @@ void HelpPlugin::extensionsInitialized()
hc.addCustomFilter(tr("Unfiltered"), QStringList());
hc.setCustomValue(key, 1);
}
m_helpEngine->blockSignals(true);
bool blocked = m_helpEngine->blockSignals(true);
m_helpEngine->setCurrentFilter(tr("Unfiltered"));
m_helpEngine->blockSignals(false);
m_helpEngine->blockSignals(blocked);
needsSetup = true;
}
......
......@@ -220,7 +220,7 @@ void BuildSettingsWidget::updateBuildSettings()
// TODO save position, entry from combbox
// Delete old tree items
m_buildConfigurationComboBox->blockSignals(true);
bool blocked = m_buildConfigurationComboBox->blockSignals(true);
m_buildConfigurationComboBox->clear();
m_subWidgets->clear();
......@@ -245,7 +245,7 @@ void BuildSettingsWidget::updateBuildSettings()
m_buildConfigurationComboBox->setCurrentIndex(m_buildConfigurationComboBox->count() - 1);
}
m_buildConfigurationComboBox->blockSignals(false);
m_buildConfigurationComboBox->blockSignals(blocked);
// TODO Restore position, entry from combbox
// TODO? select entry from combobox ?
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment