StringUtils: Don't issue warning on '*' port

Amends d91d402853

Change-Id: I750d09b770bd71ae97705e02b3dc25566af7bb66
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
This commit is contained in:
Jarek Kobus
2024-11-26 17:11:07 +01:00
committed by hjk
parent b1bf4594ba
commit 3ac6a5956d

View File

@@ -228,6 +228,9 @@ QTCREATOR_UTILS_EXPORT int parseUsedPortFromNetstatOutput(const QByteArray &line
return -1; return -1;
} }
if (columnToParse.size() > 0 && columnToParse.back() == '*')
return -1; // Valid case, no warning. See QNX udp case.
const int port = trailingNumber(columnToParse, base); const int port = trailingNumber(columnToParse, base);
if (port == -1) { if (port == -1) {
qWarning("%s: Unexpected string '%s' is not a port. Tried to read from '%s'", qWarning("%s: Unexpected string '%s' is not a port. Tried to read from '%s'",