forked from qt-creator/qt-creator
Debugger: Avoid duplication of SDK debuggers
Task-number: QTCREATORBUG-12888 Change-Id: I732f1bfe44dc47d0c96570649f3bf8c0e3f40dda Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
This commit is contained in:
committed by
Orgad Shaneh
parent
72c60097c3
commit
5b5a7d1dea
@@ -378,19 +378,16 @@ 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.
|
||||
DebuggerItem di = item;
|
||||
|
Reference in New Issue
Block a user