diff options
Diffstat (limited to 'src/plugins/debugger/debuggeritem.cpp')
-rw-r--r-- | src/plugins/debugger/debuggeritem.cpp | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/src/plugins/debugger/debuggeritem.cpp b/src/plugins/debugger/debuggeritem.cpp index 2885719ee2..9d06e9e1e3 100644 --- a/src/plugins/debugger/debuggeritem.cpp +++ b/src/plugins/debugger/debuggeritem.cpp @@ -68,17 +68,11 @@ namespace Debugger { // DebuggerItem // -------------------------------------------------------------------------- -DebuggerItem::DebuggerItem() -{ - m_engineType = NoEngineType; - m_isAutoDetected = false; -} +DebuggerItem::DebuggerItem() = default; DebuggerItem::DebuggerItem(const QVariant &id) { m_id = id; - m_engineType = NoEngineType; - m_isAutoDetected = false; } DebuggerItem::DebuggerItem(const QVariantMap &data) @@ -95,7 +89,7 @@ DebuggerItem::DebuggerItem(const QVariantMap &data) m_lastModified = data.value(QLatin1String(DEBUGGER_INFORMATION_LASTMODIFIED)).toDateTime(); foreach (const QString &a, data.value(QLatin1String(DEBUGGER_INFORMATION_ABIS)).toStringList()) { - Abi abi(a); + Abi abi = Abi::fromString(a); if (!abi.isNull()) m_abis.append(abi); } @@ -212,7 +206,7 @@ QString DebuggerItem::engineTypeName() const QStringList DebuggerItem::abiNames() const { QStringList list; - foreach (const Abi &abi, m_abis) + for (const Abi &abi : m_abis) list.append(abi.toString()); return list; } @@ -368,7 +362,7 @@ static DebuggerItem::MatchLevel matchSingle(const Abi &debuggerAbi, const Abi &t DebuggerItem::MatchLevel DebuggerItem::matchTarget(const Abi &targetAbi) const { MatchLevel bestMatch = DoesNotMatch; - foreach (const Abi &debuggerAbi, m_abis) { + for (const Abi &debuggerAbi : m_abis) { MatchLevel currentMatch = matchSingle(debuggerAbi, targetAbi, m_engineType); if (currentMatch > bestMatch) bestMatch = currentMatch; |