summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorNiklas Goby2011-03-10 18:38:25 +0100
committerNiklas Goby2011-03-10 18:38:25 +0100
commit01c8e51cbe3ff8c34eedd8b6b36c2aa8e29299a1 (patch)
tree1e74fb278eb2470cc0a5ade2e7cf441a56f207b1 /src
parentadded a method for reading the out put of a script. (diff)
downloadfbgui-01c8e51cbe3ff8c34eedd8b6b36c2aa8e29299a1.tar.gz
fbgui-01c8e51cbe3ff8c34eedd8b6b36c2aa8e29299a1.tar.xz
fbgui-01c8e51cbe3ff8c34eedd8b6b36c2aa8e29299a1.zip
collect script output function works
Diffstat (limited to 'src')
-rw-r--r--src/sysInfo.cpp6
-rw-r--r--src/sysInfo.h2
2 files changed, 5 insertions, 3 deletions
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