Commit 5b5a7d1d authored by Orgad Shaneh's avatar Orgad Shaneh Committed by Orgad Shaneh

Debugger: Avoid duplication of SDK debuggers

Task-number: QTCREATORBUG-12888
Change-Id: I732f1bfe44dc47d0c96570649f3bf8c0e3f40dda
Reviewed-by: default avatarTobias Hunger <tobias.hunger@digia.com>
parent 72c60097
......@@ -378,18 +378,15 @@ void DebuggerItemManager::saveDebuggers()
QVariant DebuggerItemManager::registerDebugger(const DebuggerItem &item)
{
// Force addition when Id is set.
if (item.id().isValid())
return addDebugger(item);
// Otherwise, try re-using existing item first.
// Try re-using existing item first.
foreach (const DebuggerItem &d, m_debuggers) {
if (d.command() == item.command()
&& d.isAutoDetected() == item.isAutoDetected()
&& d.engineType() == item.engineType()
&& d.displayName() == item.displayName()
&& d.abis() == item.abis())
&& d.abis() == item.abis()) {
return d.id();
}
}
// Nothing suitable. Create a new id and add the item.
......
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