NOISSUE fix Windows kernel numbers and add unit test for them

This commit is contained in:
Petr Mrázek 2016-11-27 00:40:02 +01:00
parent 5994c47d7c
commit ef73a2bd32
3 changed files with 29 additions and 0 deletions

View file

@ -8,6 +8,7 @@ Sys::KernelInfo Sys::getKernelInfo()
out.kernelName = "Windows";
OSVERSIONINFOW osvi;
ZeroMemory(&osvi, sizeof(OSVERSIONINFOW));
osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFOW);
GetVersionExW(&osvi);
out.kernelVersion = QString("%1.%2").arg(osvi.dwMajorVersion).arg(osvi.dwMinorVersion);
return out;