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 <tobias.hunger@digia.com>
Reviewed-by: David Kaspar <dkaspar@blackberry.com>
Reviewed-by: hjk <hjk121@nokiamail.com>
This commit is contained in:
El Mehdi Fekari
2013-12-03 17:25:38 +01:00
committed by hjk
parent 1e71d63cad
commit eb467f14b5
2 changed files with 12 additions and 0 deletions

View File

@@ -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<int>(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<ProjectExplorer::Abi> &abis)
{
m_abis = abis;

View File

@@ -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<ProjectExplorer::Abi> abis() const { return m_abis; }
void setAbis(const QList<ProjectExplorer::Abi> &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<ProjectExplorer::Abi> m_abis;
friend class Internal::DebuggerItemConfigWidget;