GH-4014 fix kernel version scanning on macOS and linux some more

This commit is contained in:
Petr Mrázek 2021-09-04 22:18:29 +02:00
parent c17b359d03
commit 823e7d22c7
2 changed files with 6 additions and 6 deletions

View File

@ -25,9 +25,9 @@ Sys::KernelInfo Sys::getKernelInfo()
if(sections.size() >= 1) {
auto versionParts = sections[0].split('.');
if(versionParts.size() >= 3) {
out.kernelMajor = sections[0].toInt();
out.kernelMinor = sections[1].toInt();
out.kernelPatch = sections[2].toInt();
out.kernelMajor = versionParts[0].toInt();
out.kernelMinor = versionParts[1].toInt();
out.kernelPatch = versionParts[2].toInt();
}
else {
qWarning() << "Not enough version numbers in " << sections[0] << " found " << versionParts.size();

View File

@ -30,9 +30,9 @@ Sys::KernelInfo Sys::getKernelInfo()
if(sections.size() >= 1) {
auto versionParts = sections[0].split('.');
if(versionParts.size() >= 3) {
out.kernelMajor = sections[0].toInt();
out.kernelMinor = sections[1].toInt();
out.kernelPatch = sections[2].toInt();
out.kernelMajor = versionParts[0].toInt();
out.kernelMinor = versionParts[1].toInt();
out.kernelPatch = versionParts[2].toInt();
}
else {
qWarning() << "Not enough version numbers in " << sections[0] << " found " << versionParts.size();