forked from qt-creator/qt-creator
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:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user