diff --git a/src/plugins/debugger/debuggeritemmanager.cpp b/src/plugins/debugger/debuggeritemmanager.cpp index cf509fc003197ef9f62e91d7a811e9d35d605bbb..2fc12f493b4dc6c2e6683e13120db306d93f489b 100644 --- a/src/plugins/debugger/debuggeritemmanager.cpp +++ b/src/plugins/debugger/debuggeritemmanager.cpp @@ -370,14 +370,10 @@ QVariant DebuggerItemManager::registerDebugger(const DebuggerItem &item) return addDebugger(item); } -void DebuggerItemManager::deregisterDebugger(const DebuggerItem &item) +void DebuggerItemManager::deregisterDebugger(const QVariant &id) { - QTC_ASSERT(!item.command().isEmpty(), return); - QTC_ASSERT(!item.displayName().isEmpty(), return); - QTC_ASSERT(item.engineType() != NoEngineType, return); - - if (findById(item.id())) - removeDebugger(item.id()); + if (findById(id)) + removeDebugger(id); } QVariant DebuggerItemManager::addDebugger(const DebuggerItem &item) diff --git a/src/plugins/debugger/debuggeritemmanager.h b/src/plugins/debugger/debuggeritemmanager.h index 615fc0f16130f66acf11bb463188c4daf96042ce..3140963dbd2030bfa5150800bd25b779bc7ef2ec 100644 --- a/src/plugins/debugger/debuggeritemmanager.h +++ b/src/plugins/debugger/debuggeritemmanager.h @@ -57,7 +57,7 @@ public: static QList<DebuggerItem> debuggers(); static QVariant registerDebugger(const DebuggerItem &item); - static void deregisterDebugger(const DebuggerItem &item); + static void deregisterDebugger(const QVariant &id); static void setItemData(const QVariant &id, const QString& displayName, const Utils::FileName &fileName); static const DebuggerItem *findByCommand(const Utils::FileName &command); diff --git a/src/plugins/debugger/debuggeritemmodel.cpp b/src/plugins/debugger/debuggeritemmodel.cpp index 602447c14916feee62f6dd1b36f7bb75fa8e0956..7cc0941866e8a2e6f53095cce1fd8d78666ac0fa 100644 --- a/src/plugins/debugger/debuggeritemmodel.cpp +++ b/src/plugins/debugger/debuggeritemmodel.cpp @@ -271,11 +271,8 @@ void DebuggerItemModel::updateDebugger(const DebuggerItem &item) void DebuggerItemModel::apply() { - foreach (const QVariant &id, m_removedItems) { - const DebuggerItem *item = DebuggerItemManager::findById(id); - QTC_ASSERT(item, return); - DebuggerItemManager::deregisterDebugger(*item); - } + foreach (const QVariant &id, m_removedItems) + DebuggerItemManager::deregisterDebugger(id); foreach (const DebuggerItem &item, debuggerItems()) { const DebuggerItem *managed = DebuggerItemManager::findById(item.id()); diff --git a/src/plugins/qnx/blackberryconfiguration.cpp b/src/plugins/qnx/blackberryconfiguration.cpp index 0ab23600656ce6fe75617340dceb4557a273c562..397c82ab942a2b27bcb518a0a2b724c2b2871c7c 100644 --- a/src/plugins/qnx/blackberryconfiguration.cpp +++ b/src/plugins/qnx/blackberryconfiguration.cpp @@ -368,7 +368,7 @@ void BlackBerryConfiguration::deactivate() foreach (const DebuggerItem &item, DebuggerItemManager::debuggers()) if (item.isAutoDetected() && (item.command() == m_simulatorDebugger || item.command() == m_deviceDebugger)) - DebuggerItemManager::deregisterDebugger(item); + DebuggerItemManager::deregisterDebugger(item.id()); foreach (ToolChain *toolChain, ToolChainManager::toolChains()) if (toolChain->isAutoDetected()