parsing fix

main
acetone 2022-09-06 13:04:37 +03:00 committed by GitHub
parent ab8ae30c55
commit 7ce6f6569a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 2 deletions

View File

@ -149,8 +149,7 @@ QString SocketRunnable::getValue(const QString &key) const
QString pattern = key+"=";
if (not result.contains(pattern)) return QString();
static QRegularExpression rgx_allToPattern("^.*"+QRegularExpression::escape(pattern));
result.remove(rgx_allToPattern);
result.remove(QRegularExpression("^.*"+QRegularExpression::escape(pattern)));
if (result.isEmpty() or result.startsWith("&")) return QString();
static QRegularExpression rgx_allFromAmpersand("&.*$");
result.remove(rgx_allFromAmpersand);