diff options
author | Tobias Hunger <tobias.hunger@theqtcompany.com> | 2015-03-06 15:13:21 +0100 |
---|---|---|
committer | hjk <hjk@theqtcompany.com> | 2015-03-13 09:33:26 +0000 |
commit | a053724c28d128a44b36d26eb1f3257b9046879a (patch) | |
tree | fc8eef48e05fd12c391149ec7058fdda33baa337 /src/plugins/debugger/debuggerkitconfigwidget.cpp | |
parent | 9c5a56a38bc41a28e5a92ace243342ab0073207a (diff) | |
download | qt-creator-a053724c28d128a44b36d26eb1f3257b9046879a.tar.gz |
Debugger: Refresh list of debuggers in kits options page on changes
Task-number: QTCREATORBUG-13991
Change-Id: I06ff6daea88e14b4193e4f1a71d768b528d80bf9
Reviewed-by: hjk <hjk@theqtcompany.com>
Diffstat (limited to 'src/plugins/debugger/debuggerkitconfigwidget.cpp')
-rw-r--r-- | src/plugins/debugger/debuggerkitconfigwidget.cpp | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/src/plugins/debugger/debuggerkitconfigwidget.cpp b/src/plugins/debugger/debuggerkitconfigwidget.cpp index bf6009867c..111f228d7d 100644 --- a/src/plugins/debugger/debuggerkitconfigwidget.cpp +++ b/src/plugins/debugger/debuggerkitconfigwidget.cpp @@ -69,14 +69,11 @@ namespace Internal { // ----------------------------------------------------------------------- DebuggerKitConfigWidget::DebuggerKitConfigWidget(Kit *workingCopy, const KitInformation *ki) - : KitConfigWidget(workingCopy, ki) + : KitConfigWidget(workingCopy, ki), + m_ignoreChanges(false) { m_comboBox = new QComboBox; m_comboBox->setEnabled(true); - m_comboBox->setToolTip(toolTip()); - m_comboBox->addItem(tr("None"), QString()); - foreach (const DebuggerItem &item, DebuggerItemManager::debuggers()) - m_comboBox->addItem(item.displayName(), item.id()); refresh(); connect(m_comboBox, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), @@ -112,8 +109,16 @@ void DebuggerKitConfigWidget::makeReadOnly() void DebuggerKitConfigWidget::refresh() { + m_ignoreChanges = true; + m_comboBox->clear(); + m_comboBox->setToolTip(toolTip()); + m_comboBox->addItem(tr("None"), QString()); + foreach (const DebuggerItem &item, DebuggerItemManager::debuggers()) + m_comboBox->addItem(item.displayName(), item.id()); + const DebuggerItem *item = DebuggerKitInformation::debugger(m_kit); updateComboBox(item ? item->id() : QVariant()); + m_ignoreChanges = false; } QWidget *DebuggerKitConfigWidget::buttonWidget() const @@ -134,6 +139,9 @@ void DebuggerKitConfigWidget::manageDebuggers() void DebuggerKitConfigWidget::currentDebuggerChanged(int) { + if (m_ignoreChanges) + return; + int currentIndex = m_comboBox->currentIndex(); QVariant id = m_comboBox->itemData(currentIndex); m_kit->setValue(DebuggerKitInformation::id(), id); |