From eb467f14b55f82e1586042244451ad30672a715c Mon Sep 17 00:00:00 2001 From: El Mehdi Fekari Date: Tue, 3 Dec 2013 17:25:38 +0100 Subject: [PATCH] Debugger: Add autoDetectionSource to DebuggerItems. This allows plugins (e.g Andoird, BlackBerry...) to control the debuggers that are auto generated from their SDK/Target sources. Change-Id: If5741bae0b81cff29ac6d103af6bc9a3e4399c7d Reviewed-by: Tobias Hunger Reviewed-by: David Kaspar Reviewed-by: hjk --- src/plugins/debugger/debuggeritem.cpp | 8 ++++++++ src/plugins/debugger/debuggeritem.h | 4 ++++ 2 files changed, 12 insertions(+) diff --git a/src/plugins/debugger/debuggeritem.cpp b/src/plugins/debugger/debuggeritem.cpp index c620e250bfc..b3ced58f0af 100644 --- a/src/plugins/debugger/debuggeritem.cpp +++ b/src/plugins/debugger/debuggeritem.cpp @@ -47,6 +47,7 @@ static const char DEBUGGER_INFORMATION_DISPLAYNAME[] = "DisplayName"; static const char DEBUGGER_INFORMATION_ID[] = "Id"; static const char DEBUGGER_INFORMATION_ENGINETYPE[] = "EngineType"; static const char DEBUGGER_INFORMATION_AUTODETECTED[] = "AutoDetected"; +static const char DEBUGGER_INFORMATION_AUTODETECTION_SOURCE[] = "AutoDetectionSource"; static const char DEBUGGER_INFORMATION_ABIS[] = "Abis"; namespace Debugger { @@ -74,6 +75,7 @@ DebuggerItem::DebuggerItem(const QVariantMap &data) m_id = data.value(QLatin1String(DEBUGGER_INFORMATION_ID)).toString(); m_displayName = data.value(QLatin1String(DEBUGGER_INFORMATION_DISPLAYNAME)).toString(); m_isAutoDetected = data.value(QLatin1String(DEBUGGER_INFORMATION_AUTODETECTED), false).toBool(); + m_autoDetectionSource = data.value(QLatin1String(DEBUGGER_INFORMATION_AUTODETECTION_SOURCE)).toString(); m_engineType = DebuggerEngineType(data.value(QLatin1String(DEBUGGER_INFORMATION_ENGINETYPE), static_cast(NoEngineType)).toInt()); @@ -185,6 +187,7 @@ QVariantMap DebuggerItem::toMap() const data.insert(QLatin1String(DEBUGGER_INFORMATION_COMMAND), m_command.toUserOutput()); data.insert(QLatin1String(DEBUGGER_INFORMATION_ENGINETYPE), int(m_engineType)); data.insert(QLatin1String(DEBUGGER_INFORMATION_AUTODETECTED), m_isAutoDetected); + data.insert(QLatin1String(DEBUGGER_INFORMATION_AUTODETECTION_SOURCE), m_autoDetectionSource); data.insert(QLatin1String(DEBUGGER_INFORMATION_ABIS), abiNames()); return data; } @@ -209,6 +212,11 @@ void DebuggerItem::setAutoDetected(bool isAutoDetected) m_isAutoDetected = isAutoDetected; } +void DebuggerItem::setAutoDetectionSource(const QString &autoDetectionSource) +{ + m_autoDetectionSource = autoDetectionSource; +} + void DebuggerItem::setAbis(const QList &abis) { m_abis = abis; diff --git a/src/plugins/debugger/debuggeritem.h b/src/plugins/debugger/debuggeritem.h index c7d9d707771..e6c13a661f5 100644 --- a/src/plugins/debugger/debuggeritem.h +++ b/src/plugins/debugger/debuggeritem.h @@ -79,6 +79,9 @@ public: bool isAutoDetected() const { return m_isAutoDetected; } void setAutoDetected(bool isAutoDetected); + QString autoDetectionSource() const { return m_autoDetectionSource; } + void setAutoDetectionSource(const QString &autoDetectionSource); + QList abis() const { return m_abis; } void setAbis(const QList &abis); void setAbi(const ProjectExplorer::Abi &abi); @@ -99,6 +102,7 @@ private: DebuggerEngineType m_engineType; Utils::FileName m_command; bool m_isAutoDetected; + QString m_autoDetectionSource; QList m_abis; friend class Internal::DebuggerItemConfigWidget;