summaryrefslogtreecommitdiffstats
path: root/src/JSObject.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/JSObject.cpp')
-rw-r--r--src/JSObject.cpp16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/JSObject.cpp b/src/JSObject.cpp
index 2d926b5..708e825 100644
--- a/src/JSObject.cpp
+++ b/src/JSObject.cpp
@@ -6,12 +6,13 @@
*/
#include "JSObject.h"
+#include "sysInfo.h"
-extern QUrl baseURL;
extern bool debug;
//-------------------------------------------------------------------------------------------------------
JSObject::JSObject(QWebFrame *parent) {
+ // check for better way to use evaluateJavaScript()
_parent = parent;
}
//-------------------------------------------------------------------------------------------------------
@@ -20,9 +21,16 @@ JSObject::~JSObject() {}
/* TEST */
QString JSObject::getInfo(QString info)
{
+ static sysInfo si;
if (debug) qDebug() << "Requested info: " << info;
- if (info == QString("mac"))
- return "MAC_ADDRESS";
+ if (debug) qDebug() << "sysInfo output: " << si.getInfo(info);
+ if (info == QString("time")){
+ return si.getInfo(info);
+ }
+ if (info == QString("mac")){
+ return si.getInfo(info);
+ //return "MAC_ADDRESS";
+ }
else
return "no value";
}
@@ -57,7 +65,7 @@ void JSObject::updateProgressBar(int i)
void JSObject::quitAll()
{
- qDebug() << "Quit signal.";
+ if (debug) qDebug() << "Quit signal.";
emit signalQuitAll();
}