diff options
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:"))) { |