mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-18 22:00:35 +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.start("awk", QStringList() << "/MemTotal/ { print $2 }" << "/proc/meminfo");
|
||||||
p.waitForFinished();
|
p.waitForFinished();
|
||||||
QString memory = p.readAllStandardOutput();
|
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();
|
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;
|
QProcess linuxgpuinfo;
|
||||||
linuxgpuinfo.start("bash", QStringList() << "-c" << "lspci | grep VGA | cut -d : -f 3");
|
linuxgpuinfo.start("bash", QStringList() << "-c" << "lspci | grep VGA | cut -d : -f 3");
|
||||||
linuxgpuinfo.waitForFinished();
|
linuxgpuinfo.waitForFinished();
|
||||||
|
|||||||
Reference in New Issue
Block a user