Debugger: Add a convenience function GdbMi::toInt()

Saves some line noise on the user side.

Change-Id: I9c6d7542195fc7485ac4ee466cd42a28be95b8da
Reviewed-by: David Schulz <david.schulz@digia.com>
This commit is contained in:
hjk
2013-05-07 12:09:54 +02:00
committed by David Schulz
parent 4f063d5bca
commit fa2ac44271
9 changed files with 38 additions and 37 deletions

View File

@@ -435,7 +435,7 @@ void ThreadsHandler::updateThreads(const GdbMi &data)
const GdbMi item = items.at(index);
const GdbMi frame = item["frame"];
ThreadData thread;
thread.id = ThreadId(item["id"].data().toInt());
thread.id = ThreadId(item["id"].toInt());
thread.targetId = QString::fromLatin1(item["target-id"].data());
thread.details = QString::fromLatin1(item["details"].data());
thread.core = QString::fromLatin1(item["core"].data());
@@ -443,7 +443,7 @@ void ThreadsHandler::updateThreads(const GdbMi &data)
thread.address = frame["addr"].data().toULongLong(&ok, 0);
thread.function = QString::fromLatin1(frame["func"].data());
thread.fileName = QString::fromLatin1(frame["fullname"].data());
thread.lineNumber = frame["line"].data().toInt();
thread.lineNumber = frame["line"].toInt();
thread.module = QString::fromLocal8Bit(frame["from"].data());
thread.stopped = true;
// Non-GDB (Cdb2) output name here.