diff options
author | Laszlo Agocs <laszlo.agocs@qt.io> | 2019-05-28 17:59:34 +0200 |
---|---|---|
committer | Laszlo Agocs <laszlo.agocs@qt.io> | 2019-05-28 17:59:40 +0200 |
commit | 0f5c34f2c6b64bae3429706a6c4211334c689092 (patch) | |
tree | b85888d73518f6abc7bbde74ab71a27887682f9d /src/plugins/qmltooling/qmldbg_server/qqmldebugserver.cpp | |
parent | 44ca7e31ee9365a72cd17ecd335ec4d0161420a9 (diff) | |
parent | 9d61684d70c8691d81536b7b519388586e2cbbb8 (diff) |
Merge remote-tracking branch 'origin/dev' into wip/scenegraphng
Change-Id: Ie7dbc5a7d9eccd1613283134a1b47ab597d036d5
Diffstat (limited to 'src/plugins/qmltooling/qmldbg_server/qqmldebugserver.cpp')
-rw-r--r-- | src/plugins/qmltooling/qmldbg_server/qqmldebugserver.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/plugins/qmltooling/qmldbg_server/qqmldebugserver.cpp b/src/plugins/qmltooling/qmldbg_server/qqmldebugserver.cpp index 8293e88038..2d5282b48c 100644 --- a/src/plugins/qmltooling/qmldbg_server/qqmldebugserver.cpp +++ b/src/plugins/qmltooling/qmldbg_server/qqmldebugserver.cpp @@ -355,14 +355,12 @@ void QQmlDebugServerImpl::parseArguments() if (argsNext == argsItEnd) break; if (ok) { - const QString nextArgument = argsNext->toString(); - - // Don't use QStringLiteral here. QRegExp has a global cache and will save an implicitly - // shared copy of the passed string. That copy isn't properly detached when the library - // is unloaded if the original string lives in the library's .rodata - if (nextArgument.contains(QRegExp(QLatin1String("^\\s*\\d+\\s*$")))) { - portTo = nextArgument.toInt(&ok); + portTo = argsNext->toString().toInt(&ok); + if (ok) { ++argsIt; + } else { + portTo = portFrom; + ok = true; } } } else if (strArgument.startsWith(QLatin1String("host:"))) { |