aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/debugger/debuggerprotocol.cpp
diff options
context:
space:
mode:
authorhjk <[email protected]>2015-02-17 17:44:54 +0100
committerhjk <[email protected]>2015-02-18 08:07:13 +0000
commite4fb098842e2a9ce7bd8fd7d5a489c2b3a57faf7 (patch)
tree5dda5a4a122a3dc3a4b67dad3588d6ad236f405c /src/plugins/debugger/debuggerprotocol.cpp
parent6d9aa0f46e096c1179731c894d640973c508664f (diff)
Debugger: Decrease dependency of protocol structures on Qt
For potential re-use in qtcreatorcdbextension. Change-Id: Ia5742b61c71fcd04eeaa894ed62218151d528a53 Reviewed-by: Christian Stenger <[email protected]>
Diffstat (limited to 'src/plugins/debugger/debuggerprotocol.cpp')
-rw-r--r--src/plugins/debugger/debuggerprotocol.cpp30
1 files changed, 3 insertions, 27 deletions
diff --git a/src/plugins/debugger/debuggerprotocol.cpp b/src/plugins/debugger/debuggerprotocol.cpp
index a82fb84ed84..286127892ae 100644
--- a/src/plugins/debugger/debuggerprotocol.cpp
+++ b/src/plugins/debugger/debuggerprotocol.cpp
@@ -233,7 +233,7 @@ void GdbMi::parseTuple_helper(const char *&from, const char *to)
//qDebug() << "\n=======\n" << qPrintable(child.toString()) << "\n========\n";
if (!child.isValid())
return;
- m_children += child;
+ m_children.push_back(child);
skipCommas(from, to);
}
}
@@ -253,7 +253,7 @@ void GdbMi::parseList(const char *&from, const char *to)
GdbMi child;
child.parseResultOrValue(from, to);
if (child.isValid())
- m_children += child;
+ m_children.push_back(child);
skipCommas(from, to);
}
}
@@ -265,7 +265,7 @@ static QByteArray ind(int indent)
void GdbMi::dumpChildren(QByteArray * str, bool multiline, int indent) const
{
- for (int i = 0; i < m_children.size(); ++i) {
+ for (size_t i = 0; i < m_children.size(); ++i) {
if (i != 0) {
*str += ',';
if (multiline)
@@ -743,30 +743,6 @@ void DebuggerCommand::argHelper(const char *name, const QByteArray &data)
args.append(",");
}
-QByteArray DebuggerCommand::toData(const QList<QByteArray> &value)
-{
- QByteArray res;
- foreach (const QByteArray &item, value) {
- if (!res.isEmpty())
- res.append(',');
- res += item;
- }
- return '[' + res + ']';
-}
-
-QByteArray DebuggerCommand::toData(const QHash<QByteArray, QByteArray> &value)
-{
- QByteArray res;
- QHashIterator<QByteArray, QByteArray> it(value);
- while (it.hasNext()) {
- it.next();
- if (!res.isEmpty())
- res.append(',');
- res += '"' + it.key() + "\":" + it.value();
- }
- return '{' + res + '}';
-}
-
void DebuggerCommand::arg(const char *name, int value)
{
argHelper(name, QByteArray::number(value));