mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-18 22:00:35 +01:00
Machine_info : add Windows RAM informations
This commit is contained in:
@@ -24,6 +24,9 @@
|
|||||||
#include <QStorageInfo>
|
#include <QStorageInfo>
|
||||||
#include <QLibraryInfo>
|
#include <QLibraryInfo>
|
||||||
|
|
||||||
|
#ifdef Q_OS_WIN
|
||||||
|
#include <windows.h>
|
||||||
|
#endif
|
||||||
#include "qet.h"
|
#include "qet.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -230,6 +233,19 @@ void Machine_info::init_get_cpu_info_winnt()
|
|||||||
pc.gpu.RAM=QString("RAM Total : %1 MB").arg(
|
pc.gpu.RAM=QString("RAM Total : %1 MB").arg(
|
||||||
WinGPURAMOutput.toLongLong() /1024 / 1024);
|
WinGPURAMOutput.toLongLong() /1024 / 1024);
|
||||||
wingpuraminfo.close();
|
wingpuraminfo.close();
|
||||||
|
|
||||||
|
#ifdef Q_OS_WIN
|
||||||
|
MEMORYSTATUSEX memory_status;
|
||||||
|
ZeroMemory(&memory_status, sizeof(MEMORYSTATUSEX));
|
||||||
|
memory_status.dwLength = sizeof(MEMORYSTATUSEX);
|
||||||
|
if (GlobalMemoryStatusEx(&memory_status)) {
|
||||||
|
pc.ram.Total .append(
|
||||||
|
QString("RAM: %1 MB")
|
||||||
|
.arg(memory_status.ullTotalPhys / (1024 * 1024)));
|
||||||
|
} else {
|
||||||
|
pc.ram.Total.append("Unknown RAM");
|
||||||
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user