Debugger: Don't register identical debuggers (unless forced)

User code can decide whether it wants something added unconditionally
(by creating a DebuggerItem with valid id), or let the manager re-use
something matching or create an id.

Task-number: QTCREATORBUG-10641
Change-Id: I4f5a1fbe881932ba5608f5c6116b4ea8352f8903
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
Reviewed-by: hjk <hjk121@nokiamail.com>
This commit is contained in:
hjk
2013-11-06 16:10:24 +01:00
parent d02c20ef7e
commit 5747719593
3 changed files with 28 additions and 3 deletions

View File

@@ -33,6 +33,7 @@
#include <projectexplorer/abi.h>
#include <utils/fileutils.h>
#include <utils/qtcassert.h>
#include <QProcess>
#include <QUuid>
@@ -56,7 +57,6 @@ namespace Debugger {
DebuggerItem::DebuggerItem()
{
m_id = QUuid::createUuid().toString();
m_engineType = NoEngineType;
m_isAutoDetected = false;
}
@@ -84,6 +84,12 @@ DebuggerItem::DebuggerItem(const QVariantMap &data)
}
}
void DebuggerItem::createId()
{
QTC_ASSERT(!m_id.isValid(), return);
m_id = QUuid::createUuid().toString();
}
void DebuggerItem::reinitializeFromFile()
{
QProcess proc;