forked from qt-creator/qt-creator
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user