debugger: more robust port number parsing

Change-Id: I78edf9faa977af8a52e3e712b06ab14785af838a
Reviewed-on: http://codereview.qt-project.org/5465
Reviewed-by: hjk <qthjk@ovi.com>
This commit is contained in:
hjk
2011-09-22 16:04:07 +02:00
committed by hjk
parent 9d8eb1f972
commit 1da7d0476e

View File

@@ -195,7 +195,7 @@ void StartGdbServerDialog::handleProcessErrorOutput(const QByteArray &ba)
// "Listening on port 10000"
int pos = ba.indexOf("Listening on port");
if (pos != -1) {
int port = ba.mid(pos + 18).toInt();
int port = ba.mid(pos + 18).trimmed().toInt();
d->ui.textBrowser->append(tr("Port %1 is now accessible.").arg(port));
emit portOpened(port);
}