Extended names for variables
Extended names for variables: from major to majorVersion; from minor to minorVersion;
This commit is contained in:
parent
39ab6dca1e
commit
fd6a47f9d9
1 changed files with 3 additions and 3 deletions
|
@ -411,10 +411,10 @@ ErrorCode ServerController::installDockerWorker(const ServerCredentials &credent
|
||||||
QRegularExpression regex(R"(Linux\s+(\d+)\.(\d+)[^\d]*)");
|
QRegularExpression regex(R"(Linux\s+(\d+)\.(\d+)[^\d]*)");
|
||||||
QRegularExpressionMatch match = regex.match(stdOut);
|
QRegularExpressionMatch match = regex.match(stdOut);
|
||||||
if (match.hasMatch()) {
|
if (match.hasMatch()) {
|
||||||
int major = match.captured(1).toInt();
|
int majorVersion = match.captured(1).toInt();
|
||||||
int minor = match.captured(2).toInt();
|
int minorVersion = match.captured(2).toInt();
|
||||||
|
|
||||||
if (major < 4 || (major == 4 && minor < 14)) {
|
if (majorVersion < 4 || (majorVersion == 4 && minorVersion < 14)) {
|
||||||
return ErrorCode::ServerLinuxKernelTooOld;
|
return ErrorCode::ServerLinuxKernelTooOld;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue