mirror of
https://github.com/yuezk/GlobalProtect-openconnect.git
synced 2025-04-02 18:31:50 -04:00
improve the version check
This commit is contained in:
parent
5dceeffc25
commit
5c8aefa4fc
@ -127,7 +127,7 @@ bool GPService::isValidVersion(QString &bin) {
|
|||||||
QProcess p;
|
QProcess p;
|
||||||
p.start(bin, QStringList("--version"));
|
p.start(bin, QStringList("--version"));
|
||||||
p.waitForFinished();
|
p.waitForFinished();
|
||||||
QString output = p.readAll();
|
QString output = p.readAllStandardError() + p.readAllStandardOutput();
|
||||||
|
|
||||||
QRegularExpression re("v(\\d+).*?(\\s|\\n)");
|
QRegularExpression re("v(\\d+).*?(\\s|\\n)");
|
||||||
QRegularExpressionMatch match = re.match(output);
|
QRegularExpressionMatch match = re.match(output);
|
||||||
|
Loading…
Reference in New Issue
Block a user