mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-17 20:50:34 +01:00
AboutQETDialog add Linux RAM Total and MemAvailable
This commit is contained in:
@@ -184,9 +184,16 @@ void AboutQETDialog::setVersion()
|
||||
p.start("awk", QStringList() << "/MemTotal/ { print $2 }" << "/proc/meminfo");
|
||||
p.waitForFinished();
|
||||
QString memory = p.readAllStandardOutput();
|
||||
compilation_info += "<br>" + QString("RAM : %1 MB").arg(memory.toLong() / 1024);
|
||||
compilation_info += "<br>" + QString("RAM Total : %1 MB").arg(memory.toLong() / 1024);
|
||||
p.close();
|
||||
|
||||
QProcess qp;
|
||||
qp.start("awk", QStringList() << "/MemAvailable/ {print $2}" << "/proc/meminfo");
|
||||
qp.waitForFinished();
|
||||
QString AvailableMemory = qp.readAllStandardOutput();
|
||||
compilation_info += "<br>" + QString("Available RAM : %1 MB").arg(AvailableMemory.toLong() / 1024);
|
||||
qp.close();
|
||||
|
||||
QProcess linuxgpuinfo;
|
||||
linuxgpuinfo.start("bash", QStringList() << "-c" << "lspci | grep VGA | cut -d : -f 3");
|
||||
linuxgpuinfo.waitForFinished();
|
||||
|
||||
Reference in New Issue
Block a user