From 01c8e51cbe3ff8c34eedd8b6b36c2aa8e29299a1 Mon Sep 17 00:00:00 2001 From: Niklas Goby Date: Thu, 10 Mar 2011 18:38:25 +0100 Subject: collect script output function works --- src/sysInfo.cpp | 6 ++++-- src/sysInfo.h | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/sysInfo.cpp b/src/sysInfo.cpp index 7cf2124..929b45d 100644 --- a/src/sysInfo.cpp +++ b/src/sysInfo.cpp @@ -25,6 +25,8 @@ QString sysInfo::getInfo(QString& infoName){ return getAllInfos(); else if (infoName == QString("json")) return getNames(); + else if (infoName == QString("script")) + return getPrcOutP2(); // still here? return "info_error"; } @@ -89,7 +91,7 @@ QString sysInfo::getAllInfos(){ return json; } // -QStringList sysInfo::getPrcOutP2() +QString sysInfo::getPrcOutP2() { QString cmd = "echo test"; QProcess *process = new QProcess(); @@ -113,6 +115,6 @@ QStringList sysInfo::getPrcOutP2() } qDebug()<<"process finished: "; - return output; + return ""; } diff --git a/src/sysInfo.h b/src/sysInfo.h index 652a3f6..dac75e8 100644 --- a/src/sysInfo.h +++ b/src/sysInfo.h @@ -19,7 +19,7 @@ class sysInfo { QString getMACAddress(); QString getIPAddress(); QString getAllInfos(); - QStringList getPrcOutP2(); + QString getPrcOutP2(); }; #endif // SYSTEMINFO_H -- cgit v1.2.3-55-g7522